commit | 92b60d55d9115af9661618d7d24da929f181be68 | [log] [tgz] |
---|---|---|
author | Mark Dickinson <mdickinson@enthought.com> | Sun Mar 27 16:25:40 2011 +0100 |
committer | Mark Dickinson <mdickinson@enthought.com> | Sun Mar 27 16:25:40 2011 +0100 |
tree | 16326265d34fcff48260bdb26cf403d97f0f6951 | |
parent | ccd2283c6fa83a7759a84605810e28713e9f1755 [diff] [blame] |
Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when trying to pack a negative (in-range) integer.
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index b293e06..4e48677 100644 --- a/Lib/xdrlib.py +++ b/Lib/xdrlib.py
@@ -50,7 +50,9 @@ def pack_uint(self, x): self.__buf.write(struct.pack('>L', x)) - pack_int = pack_uint + def pack_int(self, x): + self.__buf.write(struct.pack('>l', x)) + pack_enum = pack_int def pack_bool(self, x):