diff --git a/pisi/archive.py b/pisi/archive.py index 7673ce1b..d4205bcb 100644 --- a/pisi/archive.py +++ b/pisi/archive.py @@ -187,7 +187,7 @@ class ArchiveBzip2(ArchiveBase): import bz2 bz2_file = bz2.BZ2File(self.file_path, "r") output = open(output_path, "w") - output.write(bz2_file.read()) + output.write(bz2_file.read().decode()) output.close() bz2_file.close() @@ -213,7 +213,7 @@ class ArchiveGzip(ArchiveBase): import gzip gzip_file = gzip.GzipFile(self.file_path, "r") output = open(output_path, "w") - output.write(gzip_file.read()) + output.write(gzip_file.read().decode()) output.close() gzip_file.close() @@ -240,7 +240,7 @@ class ArchiveLzma(ArchiveBase): import lzma lzma_file = lzma.LZMAFile(self.file_path, "r") output = open(output_path, "w") - output.write(lzma_file.read()) + output.write(lzma_file.read().decode()) output.close() lzma_file.close() @@ -497,6 +497,7 @@ class ArchiveTarZ(ArchiveBase): pass self.tar.close() + class Archive7Zip(ArchiveBase): """Archive7Zip handles 7-Zip archives."""