Fix lzma decompression.

This commit is contained in:
Bastian Kleineidam 2014-06-26 21:19:08 +02:00
parent 919ba2b4a5
commit e6018f0cff
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ def _create(archive, compression, cmd, format, verbosity, filenames):
if len(filenames) > 1: if len(filenames) > 1:
raise util.PatoolError('multi-file compression not supported in Python lzma') raise util.PatoolError('multi-file compression not supported in Python lzma')
try: try:
with lzma.LZMAFile(archive, 'wb', format) as lzmafile: with lzma.LZMAFile(archive, mode='wb', format=format) as lzmafile:
filename = filenames[0] filename = filenames[0]
with open(filename, 'rb') as srcfile: with open(filename, 'rb') as srcfile:
data = srcfile.read(READ_SIZE_BYTES) data = srcfile.read(READ_SIZE_BYTES)