diff --git a/Lib/urllib.py b/Lib/urllib.py index 02edb3b265a..a16529a5fc6 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]