From: Nicholas Riley Date: Sun, 24 Sep 2000 06:29:50 +0000 (+0000) Subject: Fixes for Python 1.6 compatibility - socket bind and connect get a X-Git-Tag: v2.0b2~92 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a580c440c4f064a92bbc537ac3a2df1c0998afc;p=python Fixes for Python 1.6 compatibility - socket bind and connect get a tuple instead two arguments. --- diff --git a/Lib/idlelib/protocol.py b/Lib/idlelib/protocol.py index 10295bf4f7..f3f638253c 100644 --- a/Lib/idlelib/protocol.py +++ b/Lib/idlelib/protocol.py @@ -328,7 +328,7 @@ class Server (Thread): try: self.wellknown = s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.bind('', self.port) + s.bind(('', self.port)) s.listen(3) except: raise connectionLost @@ -361,7 +361,7 @@ class Server (Thread): def Client(ip='127.0.0.1', port=None): try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.connect(ip,port or Server.default_port) + s.connect((ip,port or Server.default_port)) except socket.error, what: raise connectionLost(str(what)) except: