This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author szabihernyo
Recipients
Date 2007-04-11.12:58:45
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
In zipfile.py:448
date = "%d-%02d-%02d %02d:%02d:%02d" % zinfo.date_time
should be changed to
date = "%d-%02d-%02d %02d:%02d:%02d" % zinfo.date_time[:6]

checked with python2.[45] on windows and linux


>>> from zipfile import ZipFile
>>> from StringIO import StringIO
>>> s = StringIO()
>>> zf = ZipFile(s, 'w')
>>> zf.writestr('file.ext', '123')
>>> zf.printdir()
File Name                                             Modified             Size
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/zipfile.py", line 448, in printdir
    date = "%d-%02d-%02d %02d:%02d:%02d" % zinfo.date_time
TypeError: int argument required
>>> zf.filelist[0].date_time
(2007, 4, 11, 13, 38, 58, 2, 101, 1)
>>>
History
Date User Action Args
2007-08-23 14:53:03adminlinkissue1698398 messages
2007-08-23 14:53:03admincreate