diff options
author | Bob Ippolito <bob@redivi.com> | 2006-05-26 12:52:53 (GMT) |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2006-05-26 12:52:53 (GMT) |
commit | 910a08f6da226b892b8bfdb69c61b80386627fd2 (patch) | |
tree | b6de0b73aa807be823265c8b734bde3db62eac53 /Lib | |
parent | ad0cb65fca0fbac51dbe32fb79adca2ed0c3dd31 (diff) | |
download | cpython-910a08f6da226b892b8bfdb69c61b80386627fd2.zip cpython-910a08f6da226b892b8bfdb69c61b80386627fd2.tar.gz cpython-910a08f6da226b892b8bfdb69c61b80386627fd2.tar.bz2 |
quick hack to fix busted binhex test
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/binhex.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/binhex.py b/Lib/binhex.py index 16985fb..4f3882a 100644 --- a/Lib/binhex.py +++ b/Lib/binhex.py @@ -217,7 +217,11 @@ class BinHex: 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): |