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 r.david.murray
Recipients Trundle, ev, r.david.murray
Date 2011-03-16.16:40:56
SpamBayes Score 0.0025460715
Marked as misclassified No
Message-id <1300293657.39.0.907900682627.issue11513@psf.upfronthosting.co.za>
In-reply-to
Content
This fix reveals a second bug.  Without this fix, a non-existent file raises an IOError with an appropriate error message, but with the chained exception.  After this fix, it raises an error that says 'not a gzip file', which while technically true is not very helpful :)

The correct IOError message only happened by accident in the original code, but we need to fix this second bug in order to fix the first one correctly.  I suggest that the test case should read:

  with self.assertRaisesRegex("xxx", IOError) as ex:
      tarfile.open("xxx", self.mode)
  self.assertEqual(ex.exception.errno, errno.ENOENT)
History
Date User Action Args
2011-03-16 16:40:57r.david.murraysetrecipients: + r.david.murray, Trundle, ev
2011-03-16 16:40:57r.david.murraysetmessageid: <1300293657.39.0.907900682627.issue11513@psf.upfronthosting.co.za>
2011-03-16 16:40:56r.david.murraylinkissue11513 messages
2011-03-16 16:40:56r.david.murraycreate