diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2011-10-23 22:11:00 +0200 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2011-10-23 22:11:00 +0200 |
commit | ac48fe18d1832a71664bfb8e975f0b5c3676b106 (patch) | |
tree | bf5ba2a10d5e515d56664c4429e4dae37c8c184a /Lib/xdrlib.py | |
parent | 3105ffbc54a5909865527849e45abe7f35b664ab (diff) | |
download | cpython-ac48fe18d1832a71664bfb8e975f0b5c3676b106.tar.gz |
Cleanup code: remove int/long idioms and simplify a while statement.
Diffstat (limited to 'Lib/xdrlib.py')
-rw-r--r-- | Lib/xdrlib.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index 4e48677040..86e624f85d 100644 --- a/Lib/xdrlib.py +++ b/Lib/xdrlib.py @@ -141,11 +141,7 @@ class Unpacker: data = self.__buf[i:j] if len(data) < 4: raise EOFError - x = struct.unpack('>L', data)[0] - try: - return int(x) - except OverflowError: - return x + return struct.unpack('>L', data)[0] def unpack_int(self): i = self.__pos |