[Python-checkins] r46314 - python/trunk/Lib/binhex.py
bob.ippolito
python-checkins at python.org
Fri May 26 14:52:54 CEST 2006
Author: bob.ippolito
Date: Fri May 26 14:52:53 2006
New Revision: 46314
Modified:
python/trunk/Lib/binhex.py
Log:
quick hack to fix busted binhex test
Modified: python/trunk/Lib/binhex.py
==============================================================================
--- python/trunk/Lib/binhex.py (original)
+++ python/trunk/Lib/binhex.py Fri May 26 14:52:53 2006
@@ -217,7 +217,11 @@
def _writecrc(self):
# XXXX Should this be here??
# self.crc = binascii.crc_hqx('\0\0', self.crc)
- self.ofp.write(struct.pack('>h', self.crc))
+ if self.crc < 0:
+ fmt = '>h'
+ else:
+ fmt = '>H'
+ self.ofp.write(struct.pack(fmt, self.crc))
self.crc = 0
def write(self, data):
More information about the Python-checkins
mailing list