[issue2251] tarfile using nonexistent function

Goten Xiao report at bugs.python.org
Fri Mar 7 12:17:51 CET 2008


New submission from Goten Xiao:

Steps to reproduce:

Create test.py with the following contents:
tar = tarfile.open("test.tar", "w")
tar.addfile("testdir")
tar.close()

Run the following commands (or equivalent on alternative platforms):
mkdir testdir
touch testdir/testfile
python test.py

Resultant output:
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    tar.addfile("testdir")
  File "/usr/lib/python2.5/tarfile.py", line 1492, in addfile
    buf = tarinfo.tobuf(self.posix)
AttributeError: 'str' object has no attribute 'tobuf'

Tested on Python 2.5.1 and 2.5.2 from slackware-current packages.

----------
components: Library (Lib)
messages: 63351
nosy: GotenXiao
severity: major
status: open
title: tarfile using nonexistent function
type: crash
versions: Python 2.5

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2251>
__________________________________


More information about the Python-bugs-list mailing list