diff options
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r-- | Lib/test/test_support.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 2c19698..6115800 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -102,7 +102,8 @@ def bind_port(sock, host='', preferred_port=54321): try: sock.bind((host, port)) return port - except socket.error, (err, msg): + except socket.error as e: + (err, msg) = e if err != errno.EADDRINUSE: raise print >>sys.__stderr__, \ |