aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib-python/3/xdrlib.py')
-rw-r--r--lib-python/3/xdrlib.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib-python/3/xdrlib.py b/lib-python/3/xdrlib.py
index 4e48677040..c05cf87e4a 100644
--- a/lib-python/3/xdrlib.py
+++ b/lib-python/3/xdrlib.py
@@ -13,7 +13,7 @@ __all__ = ["Error", "Packer", "Unpacker", "ConversionError"]
class Error(Exception):
"""Exception class for this module. Use:
- except xdrlib.Error, var:
+ except xdrlib.Error as var:
# var has the Error instance for the exception
Public ivars:
@@ -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