summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-03-28 21:45:46 (GMT)
committerGuido van Rossum <guido@python.org>2000-03-28 21:45:46 (GMT)
commit93a7c0fe6b2186448ebe35a5af0ac3880d8f16fc (patch)
tree7e53b81f5f272f55a86e62234e06e482123f50fe /Lib
parent1916b35f5864b2bfe5e2687b7db4fc0c329c9402 (diff)
downloadcpython-93a7c0fe6b2186448ebe35a5af0ac3880d8f16fc.zip
cpython-93a7c0fe6b2186448ebe35a5af0ac3880d8f16fc.tar.gz
cpython-93a7c0fe6b2186448ebe35a5af0ac3880d8f16fc.tar.bz2
Fredrik Lundh:
This fixes a bunch of socket.connect(host, post) calls. Note that I haven't tested all modules -- I don't have enough servers here...
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ftplib.py4
-rw-r--r--Lib/gopherlib.py2
-rw-r--r--Lib/httplib.py4
-rw-r--r--Lib/imaplib.py2
-rw-r--r--Lib/nntplib.py2
-rw-r--r--Lib/poplib.py2
-rwxr-xr-xLib/smtplib.py2
7 files changed, 9 insertions, 9 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 9e3b701..fd9127b 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -115,7 +115,7 @@ class FTP:
if port: self.port = port
self.passiveserver = 0
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.sock.connect(self.host, self.port)
+ self.sock.connect((self.host, self.port))
self.file = self.sock.makefile('rb')
self.welcome = self.getresp()
return self.welcome
@@ -265,7 +265,7 @@ class FTP:
if self.passiveserver:
host, port = parse227(self.sendcmd('PASV'))
conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- conn.connect(host, port)
+ conn.connect((host, port))
resp = self.sendcmd(cmd)
if resp[0] <> '1':
raise error_reply, resp
diff --git a/Lib/gopherlib.py b/Lib/gopherlib.py
index d805f15..6965fbd 100644
--- a/Lib/gopherlib.py
+++ b/Lib/gopherlib.py
@@ -66,7 +66,7 @@ def send_selector(selector, host, port = 0):
elif type(port) == type(''):
port = string.atoi(port)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect(host, port)
+ s.connect((host, port))
s.send(selector + CRLF)
s.shutdown(1)
return s.makefile('rb')
diff --git a/Lib/httplib.py b/Lib/httplib.py
index a43adde..8c8084e 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -109,7 +109,7 @@ class HTTP:
if not port: port = HTTP_PORT
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if self.debuglevel > 0: print 'connect:', (host, port)
- self.sock.connect(host, port)
+ self.sock.connect((host, port))
def send(self, str):
"""Send `str' to the server."""
@@ -209,7 +209,7 @@ if hasattr(socket, "ssl"):
if not port: port = HTTPS_PORT
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if self.debuglevel > 0: print 'connect:', (host, port)
- sock.connect(host, port)
+ sock.connect((host, port))
ssl = socket.ssl(sock, self.key_file, self.cert_file)
self.sock = FakeSocket(sock, ssl)
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index 31893a5..921ee0c 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -191,7 +191,7 @@ class IMAP4:
def open(self, host, port):
"""Setup 'self.sock' and 'self.file'."""
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.sock.connect(self.host, self.port)
+ self.sock.connect((self.host, self.port))
self.file = self.sock.makefile('r')
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index 292e6b0..81449b0 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -108,7 +108,7 @@ class NNTP:
self.host = host
self.port = port
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.sock.connect(self.host, self.port)
+ self.sock.connect((self.host, self.port))
self.file = self.sock.makefile('rb')
self.debugging = 0
self.welcome = self.getresp()
diff --git a/Lib/poplib.py b/Lib/poplib.py
index a4fd2bc..118811c 100644
--- a/Lib/poplib.py
+++ b/Lib/poplib.py
@@ -77,7 +77,7 @@ class POP3:
self.host = host
self.port = port
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.sock.connect(self.host, self.port)
+ self.sock.connect((self.host, self.port))
self.file = self.sock.makefile('rb')
self._debugging = 0
self.welcome = self._getresp()
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index f58d5fc..4462d62 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -213,7 +213,7 @@ class SMTP:
if not port: port = SMTP_PORT
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if self.debuglevel > 0: print 'connect:', (host, port)
- self.sock.connect(host, port)
+ self.sock.connect((host, port))
(code,msg)=self.getreply()
if self.debuglevel >0 : print "connect:", msg
return (code,msg)