From: Guido van Rossum Date: Sat, 8 Oct 1994 19:13:48 +0000 (+0000) Subject: fix bind arg X-Git-Tag: v1.1~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00d59746f6d06e3dc7d85ff2ab05e0f3542de816;p=thirdparty%2FPython%2Fcpython.git fix bind arg --- diff --git a/Demo/sockets/broadcast.py b/Demo/sockets/broadcast.py index e7e6b9b1d1de..4b30143d9599 100755 --- a/Demo/sockets/broadcast.py +++ b/Demo/sockets/broadcast.py @@ -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: diff --git a/Demo/sockets/mcast.py b/Demo/sockets/mcast.py index 401138362e9c..8c6298ef4b51 100755 --- a/Demo/sockets/mcast.py +++ b/Demo/sockets/mcast.py @@ -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) diff --git a/Demo/sockets/radio.py b/Demo/sockets/radio.py index 5905ff2a3cf3..6131d40053b1 100755 --- a/Demo/sockets/radio.py +++ b/Demo/sockets/radio.py @@ -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)