diff options
| author | Lars Gustäbel <lars@gustaebel.de> | 2007-04-20 20:10:59 (GMT) |
|---|---|---|
| committer | Lars Gustäbel <lars@gustaebel.de> | 2007-04-20 20:10:59 (GMT) |
| commit | 9319e43c675920fa69d1461bf9c6bb451647ae4d (patch) | |
| tree | 497e0e1d16ebab23c70d2eb35a1989f67bfb0e7f /Lib/tarfile.py | |
| parent | d220144a84b71d4d6a35d68b091a45780c5e5162 (diff) | |
| download | cpython-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.py | 4 |
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'") |
