New submission from George Notaras:
Assume a healthy uncompressed tar file: a.tar
When trying to open the tarfile using a fileobject, there is always an
exception:
>>> f_raw = open("a.tar", "rb")
>>> import tarfile
>>> f_tar = tarfile.open(mode="r:", fileobj=f_raw)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/tarfile.py", line 1157, in open
return func(name, filemode, fileobj)
File "/usr/lib/python2.5/tarfile.py", line 1183, in taropen
return cls(name, mode, fileobj)
File "/usr/lib/python2.5/tarfile.py", line 1047, in __init__
self.name = os.path.abspath(name)
File "/usr/lib/python2.5/posixpath.py", line 402, in abspath
if not isabs(path):
File "/usr/lib/python2.5/posixpath.py", line 49, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
----------
components: Extension Modules
messages: 58011
nosy: GeorgeNotaras
severity: normal
status: open
title: Error when passing a file object to tarfile.open()
type: crash
versions: Python 2.5
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1529>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com