mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
quick hack to fix busted binhex test
This commit is contained in:
parent
ad0cb65fca
commit
910a08f6da
1 changed files with 5 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue