Comment 1 for bug 254791

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 254791] [NEW] export to tar broken on mac os x

On Mon, 2008-08-04 at 21:59 +0000, Lucio Torre wrote:
> Public bug reported:
>
> Mac OS X 10.4, python2.5
>
> running "make check" fails after 204 tests on test_tar_export.

> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/export/tar_exporter.py", line 40, in tar_exporter
> ball = tarfile.open(None, 'w|' + compression, sys.stdout)
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/tarfile.py", line 1168, in open
> _Stream(name, filemode, comptype, fileobj, bufsize))
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/tarfile.py", line 1047, in __init__
> self.name = os.path.abspath(name)
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 402, in abspath
> if not isabs(path):
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 49, in isabs
> return s.startswith('/')
> AttributeError: 'NoneType' object has no attribute 'startswith'

This appears to be a python bug.

 pydoc tarfile.open ->
tarfile.open = open(cls, name=None, mode='r', fileobj=None,
bufsize=10240)

We're passing no name and a fileobj of sys.stdout - your tarfile.py is
being bogus by trying to get the abs path for None.

Are you running a release python?

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.