From c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 2 Dec 1997 20:26:21 +0000 Subject: When a port is specified in an ftp:// URL, must convert it to a number! --- Lib/urllib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/urllib.py b/Lib/urllib.py index 02edb3b..a16529a 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] -- cgit v0.12