commit | 910a08f6da226b892b8bfdb69c61b80386627fd2 | [log] [tgz] |
---|---|---|
author | Bob Ippolito <bob@redivi.com> | Fri May 26 12:52:53 2006 +0000 |
committer | Bob Ippolito <bob@redivi.com> | Fri May 26 12:52:53 2006 +0000 |
tree | b6de0b73aa807be823265c8b734bde3db62eac53 | |
parent | ad0cb65fca0fbac51dbe32fb79adca2ed0c3dd31 [diff] |
quick hack to fix busted binhex test
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 @@ 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):