@@ -239,7 +239,7 @@ def CompressCatFile(fp, compression="auto"):
239239 fp .seek (0 , 0 );
240240 if (not compression or compression or compression == "catfile" ):
241241 compression = None ;
242- if (compression not in compressionlist and compression is not None ):
242+ if (compression not in compressionlist and compression is None ):
243243 compression = "auto" ;
244244 if (compression == "gzip" ):
245245 try :
@@ -315,7 +315,7 @@ def PackCatFile(infiles, outfile, compression="auto", followlink=False, checksum
315315 checksumtype = "crc32" ;
316316 if (not compression or compression or compression == "catfile" ):
317317 compression = None ;
318- if (compression not in compressionlist and compression is not None ):
318+ if (compression not in compressionlist and compression is None ):
319319 compression = "auto" ;
320320 if (verbose ):
321321 logging .basicConfig (format = "%(message)s" , stream = sys .stdout , level = logging .DEBUG );
@@ -501,7 +501,7 @@ def PackCatFileFromTarFile(infile, outfile, compression="auto", checksumtype="cr
501501 checksumtype = "crc32" ;
502502 if (not compression or compression or compression == "catfile" ):
503503 compression = None ;
504- if (compression not in compressionlist and compression is not None ):
504+ if (compression not in compressionlist and compression is None ):
505505 compression = "auto" ;
506506 if (hasattr (infile , "read" ) or hasattr (infile , "write" )):
507507 tarinput = infile ;
@@ -899,7 +899,7 @@ def RePackCatFile(infile, outfile, seekstart=0, seekend=0, compression="auto", c
899899 checksumtype = "crc32" ;
900900 if (not compression or compression or compression == "catfile" ):
901901 compression = None ;
902- if (compression not in compressionlist and compression is not None ):
902+ if (compression not in compressionlist and compression is None ):
903903 compression = "auto" ;
904904 if (verbose ):
905905 logging .basicConfig (format = "%(message)s" , stream = sys .stdout , level = logging .DEBUG );
0 commit comments