diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2011-03-27 15:15:24 (GMT) |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2011-03-27 15:15:24 (GMT) |
commit | d687be09b4c691850e160f7daccb8ed9d63551b0 (patch) | |
tree | 6d8e3d9369bb78e4142ea0391b0c29ff4ebc608c /Lib/xdrlib.py | |
parent | 1829e8fc7cb1bb61362476309cd725c1b017196a (diff) | |
download | cpython-d687be09b4c691850e160f7daccb8ed9d63551b0.zip cpython-d687be09b4c691850e160f7daccb8ed9d63551b0.tar.gz cpython-d687be09b4c691850e160f7daccb8ed9d63551b0.tar.bz2 |
Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when trying to pack a negative (in-range) integer.
Diffstat (limited to 'Lib/xdrlib.py')
-rw-r--r-- | Lib/xdrlib.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index 796dfaf..ef172dd 100644 --- a/Lib/xdrlib.py +++ b/Lib/xdrlib.py @@ -53,7 +53,9 @@ class Packer: 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): |