Author tal197
Recipients
Date 2007-04-24.18:53:18
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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,
History
Date User Action Args
2007-08-23 14:53:21adminlinkissue1706850 messages
2007-08-23 14:53:21admincreate