From e6018f0cffe952d932776809b938acf948fc024d Mon Sep 17 00:00:00 2001
From: Bastian Kleineidam <bastian.kleineidam@web.de>
Date: Thu, 26 Jun 2014 21:19:08 +0200
Subject: [PATCH] Fix lzma decompression.

---
 patoolib/programs/py_lzma.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/patoolib/programs/py_lzma.py b/patoolib/programs/py_lzma.py
index f73df98..7f709bd 100644
--- a/patoolib/programs/py_lzma.py
+++ b/patoolib/programs/py_lzma.py
@@ -48,7 +48,7 @@ def _create(archive, compression, cmd, format, verbosity, filenames):
     if len(filenames) > 1:
         raise util.PatoolError('multi-file compression not supported in Python lzma')
     try:
-        with lzma.LZMAFile(archive, 'wb', format) as lzmafile:
+        with lzma.LZMAFile(archive, mode='wb', format=format) as lzmafile:
             filename = filenames[0]
             with open(filename, 'rb') as srcfile:
                 data = srcfile.read(READ_SIZE_BYTES)