From: Guido van Rossum Date: Tue, 2 Dec 1997 20:26:21 +0000 (+0000) Subject: When a port is specified in an ftp:// URL, must convert it to a number! X-Git-Tag: v1.5b2~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4;p=thirdparty%2FPython%2Fcpython.git When a port is specified in an ftp:// URL, must convert it to a number! --- diff --git a/Lib/urllib.py b/Lib/urllib.py index 02edb3b265aa..a16529a5fc61 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -323,6 +323,8 @@ class URLopener: if not port: import ftplib port = ftplib.FTP_PORT + else: + port = int(port) path, attrs = splitattr(path) dirs = string.splitfields(path, '/') dirs, file = dirs[:-1], dirs[-1]