This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients akuchling, dbonner, niemeyer, pitrou, r.david.murray, therve, thomaslee
Date 2009-10-24.18:44:19
SpamBayes Score 0.0020801753
Marked as misclassified No
Message-id <>
I'm not comfortable with the following change (which appears twice in
the patch):

-			BZ2_bzReadClose(&bzerror, self->fp);
+			if (self->fp)
+				BZ2_bzReadClose(&bzerror, self->fp);
 		case MODE_WRITE:
-			BZ2_bzWriteClose(&bzerror, self->fp,
-					 0, NULL, NULL);
+			if (self->fp)
+				BZ2_bzWriteClose(&bzerror, self->fp,
+						 0, NULL, NULL);

If you need to test for the file pointer, perhaps there's a logic flaw
in your patch. Also, it might be dangerous in write mode: could it occur
that the file isn't closed but the problem isn't reported?
Date User Action Args
2009-10-24 18:44:20pitrousetrecipients: + pitrou, akuchling, niemeyer, therve, thomaslee, r.david.murray, dbonner
2009-10-24 18:44:20pitrousetmessageid: <>
2009-10-24 18:44:19pitroulinkissue1625 messages
2009-10-24 18:44:19pitroucreate