Issue 1706850: tarfile fails in 2.5.1 (NoneType has no ...) (original) (raw)
In Python 2.5.1's tarfile.py, we have:
def init(self, name=None, mode="r", fileobj=None): self.name = os.path.abspath(name)
If name is None (e.g. extracting from a stream) we get e.g.:
Traceback (most recent call last): File "tarfile.py", line 1168, in open _Stream(name, filemode, comptype, fileobj, bufsize)) File "tarfile.py", line 1047, in init self.name = os.path.abspath(name) File "posixpath.py", line 402, in abspath if not isabs(path): File "posixpath.py", line 49, in isabs return s.startswith('/') AttributeError: 'NoneType' object has no attribute 'startswith'
It works with Python 2.3.6, 2.4.4 and 2.5.0, but not 2.5.1.
(discovered by Zero Install unit-tests)
Thanks,