]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix bind arg
authorGuido van Rossum <guido@python.org>
Sat, 8 Oct 1994 19:13:48 +0000 (19:13 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 8 Oct 1994 19:13:48 +0000 (19:13 +0000)
Demo/sockets/broadcast.py
Demo/sockets/mcast.py
Demo/sockets/radio.py

index e7e6b9b1d1def94c01aaeef374acb7d4987cbf1c..4b30143d95999a877dca6745e2628055a9175177 100755 (executable)
@@ -7,7 +7,7 @@ from socket import *
 from SOCKET import *
 
 s = socket(AF_INET, SOCK_DGRAM)
-s.bind('', 0)
+s.bind(('', 0))
 s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
 
 while 1:
index 401138362e9c7567341d65ad36860711e724344d..8c6298ef4b51b2b9cce630905b4900b60ea7ab04 100755 (executable)
@@ -73,7 +73,7 @@ def openmcastsock(group, port):
        s.setsockopt(SOL_SOCKET, SO_REUSEPORT, 1)
        #
        # Bind it to the port
-       s.bind('', port)
+       s.bind(('', port))
        #
        # Look up multicast group address in name server
        # (doesn't hurt if it is already in ddd.ddd.ddd.ddd format)
index 5905ff2a3cf3fe35473f4e7cdc1053a2fece5770..6131d40053b1fd34d6363a3c5ad6fcb0d37cc106 100755 (executable)
@@ -6,7 +6,7 @@ import sys
 from socket import *
 
 s = socket(AF_INET, SOCK_DGRAM)
-s.bind('', MYPORT)
+s.bind(('', MYPORT))
 
 while 1:
        data, wherefrom = s.recvfrom(1500, 0)