From: Guido van Rossum Date: Wed, 9 May 2007 23:43:17 +0000 (+0000) Subject: Fix code depending on exception unpacking. X-Git-Tag: v3.0a1~974 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2c8f2d5817fe530a873248bb5d82dcaa7d0f57e;p=python Fix code depending on exception unpacking. --- diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 57b1db3919..7cbee0ad8f 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -106,7 +106,7 @@ def bind_port(sock, host='', preferred_port=54321): sock.bind((host, port)) return port except socket.error as e: - (err, msg) = e + (err, msg) = e.args if err != errno.EADDRINUSE: raise print(' WARNING: failed to listen on port %d, trying another' % port, file=sys.__stderr__)