[ python-Bugs-1706850 ] tarfile fails in 2.5.1 (NoneType has no ...)
SourceForge.net
noreply at sourceforge.net
Tue Apr 24 20:53:18 CEST 2007
Bugs item #1706850, was opened at 2007-04-24 19:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1706850&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Thomas Leonard (tal197)
Assigned to: Nobody/Anonymous (nobody)
Summary: tarfile fails in 2.5.1 (NoneType has no ...)
Initial Comment:
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,
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1706850&group_id=5470
More information about the Python-bugs-list
mailing list