summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 6d73569..7b9f407 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -1681,8 +1681,7 @@ class TarFile(object):
except ImportError:
raise CompressionError("lzma module is not available")
- fileobj = lzma.LZMAFile(filename=name if fileobj is None else None,
- mode=mode, fileobj=fileobj, preset=preset)
+ fileobj = lzma.LZMAFile(fileobj or name, mode, preset=preset)
try:
t = cls.taropen(name, mode, fileobj, **kwargs)