[Python-3000-checkins] r57677 - python/branches/py3k/Lib/zipfile.py
jeremy.hylton
python-3000-checkins at python.org
Wed Aug 29 21:09:54 CEST 2007
Author: jeremy.hylton
Date: Wed Aug 29 21:09:54 2007
New Revision: 57677
Modified:
python/branches/py3k/Lib/zipfile.py
Log:
Change string literal to bytes.
Modified: python/branches/py3k/Lib/zipfile.py
==============================================================================
--- python/branches/py3k/Lib/zipfile.py (original)
+++ python/branches/py3k/Lib/zipfile.py Wed Aug 29 21:09:54 2007
@@ -135,7 +135,7 @@
fpin.seek(-22, 2) # Assume no archive comment.
filesize = fpin.tell() + 22 # Get file size
data = fpin.read()
- if data[0:4] == stringEndArchive and data[-2:] == "\000\000":
+ if data[0:4] == stringEndArchive and data[-2:] == b"\000\000":
endrec = struct.unpack(structEndArchive, data)
endrec = list(endrec)
endrec.append("") # Append the archive comment
More information about the Python-3000-checkins
mailing list