[Python-3000-checkins] r55614 - python/branches/py3k-struni/Lib/binhex.py
guido.van.rossum
python-3000-checkins at python.org
Sun May 27 11:20:49 CEST 2007
Author: guido.van.rossum
Date: Sun May 27 11:20:49 2007
New Revision: 55614
Modified:
python/branches/py3k-struni/Lib/binhex.py
Log:
Make the binhex test pass on Darwin.
Grr. Do we really want to support this module?
Modified: python/branches/py3k-struni/Lib/binhex.py
==============================================================================
--- python/branches/py3k-struni/Lib/binhex.py (original)
+++ python/branches/py3k-struni/Lib/binhex.py Sun May 27 11:20:49 2007
@@ -191,8 +191,8 @@
nl = len(name)
if nl > 63:
raise Error, 'Filename too long'
- d = bytes(chr(nl)) + bytes(name) + b'\0'
- d2 = bytes(finfo.Type, "latin-1") + bytes(finfo.Creator, "latin-1")
+ d = bytes([nl]) + bytes(name) + b'\0'
+ d2 = bytes(finfo.Type) + bytes(finfo.Creator)
# Force all structs to be packed with big-endian
d3 = struct.pack('>h', finfo.Flags)
@@ -420,8 +420,8 @@
self.FName = fname
self.FInfo = FInfo()
- self.FInfo.Creator = creator
- self.FInfo.Type = type
+ self.FInfo.Creator = str8(creator)
+ self.FInfo.Type = str8(type)
self.FInfo.Flags = flags
self.state = _DID_HEADER
More information about the Python-3000-checkins
mailing list