summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2007-04-20 20:10:59 (GMT)
committerLars Gustäbel <lars@gustaebel.de>2007-04-20 20:10:59 (GMT)
commit9319e43c675920fa69d1461bf9c6bb451647ae4d (patch)
tree497e0e1d16ebab23c70d2eb35a1989f67bfb0e7f /Lib/tarfile.py
parentd220144a84b71d4d6a35d68b091a45780c5e5162 (diff)
downloadcpython-9319e43c675920fa69d1461bf9c6bb451647ae4d.zip
cpython-9319e43c675920fa69d1461bf9c6bb451647ae4d.tar.gz
cpython-9319e43c675920fa69d1461bf9c6bb451647ae4d.tar.bz2
Patch #1695229: Fix a regression with tarfile.open() and a missing name
argument.
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 261d9fb..474e306 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -1044,7 +1044,9 @@ class TarFile(object):
can be determined, `mode' is overridden by `fileobj's mode.
`fileobj' is not closed, when TarFile is closed.
"""
- self.name = os.path.abspath(name)
+ self.name = name
+ if self.name is not None:
+ self.name = os.path.abspath(name)
if len(mode) > 1 or mode not in "raw":
raise ValueError("mode must be 'r', 'a' or 'w'")