]> granicus.if.org Git - python/commitdiff
Fixes for Python 1.6 compatibility - socket bind and connect get a
authorNicholas Riley <nriley@sabi.net>
Sun, 24 Sep 2000 06:29:50 +0000 (06:29 +0000)
committerNicholas Riley <nriley@sabi.net>
Sun, 24 Sep 2000 06:29:50 +0000 (06:29 +0000)
tuple instead two arguments.

Lib/idlelib/protocol.py

index 10295bf4f78d8c11a4b6387da0e6d1632060df58..f3f638253c5c21fc8cf821c569268ebcce81d9e9 100644 (file)
@@ -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: