Message107643
If you pass an explicit mode, the error message is more or less what you want:
>>> tarfile.open("uga.tgz", mode="r:gz")
[...]
tarfile.CompressionError: gzip module is not available
The way mode="r" detects which compression format is used is to open the file with each open method (i.e. taropen, gzopen, bz2open) until one of them succeeds. If none of them matches it is impossible to say what the reason was.
As this would require more than just a simple one-line change, 2.7 is out of the question. But I see what I can do for 3.2. |
|
Date |
User |
Action |
Args |
2010-06-12 10:33:12 | lars.gustaebel | set | recipients:
+ lars.gustaebel, vstinner, flox |
2010-06-12 10:33:12 | lars.gustaebel | set | messageid: <1276338792.46.0.358387918153.issue8978@psf.upfronthosting.co.za> |
2010-06-12 10:33:10 | lars.gustaebel | link | issue8978 messages |
2010-06-12 10:33:10 | lars.gustaebel | create | |
|