Author eric.araujo
Recipients eric.araujo, georg.brandl, nadeem.vawda, tarek
Date 2012-02-24.07:48:12
SpamBayes Score 1.01082e-05
Marked as misclassified No
Message-id <>
I intend to commit this simple fix for all branches:

-    _UNPACK_FORMATS['bztar'] = (['.bz2'], _unpack_tarfile, [],
+    _UNPACK_FORMATS['bztar'] = (['.tar.bz2'], _unpack_tarfile, [],

I could write a unit test, but it would be coupled to the exact text of the exception* (i.e. with assertRaisesRegex) and IMO not very useful.  I tested manually: I compressed a text file with bzip2, passed the filename to unpack_archive, and it tried to unpack it with tarfile.  With my fix, it does not try to unpack it.

* unpack_archive raises ValueError when you give an unsupported value to its format
  parameter, but when it’s in autodetect mode and can’t find an unpacker for the file
  extension, then it raises a ReadError.  Is it okay to change that to ValueError?
Date User Action Args
2012-02-24 07:48:13eric.araujosetrecipients: + eric.araujo, georg.brandl, nadeem.vawda, tarek
2012-02-24 07:48:13eric.araujosetmessageid: <>
2012-02-24 07:48:12eric.araujolinkissue14061 messages
2012-02-24 07:48:12eric.araujocreate