summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/urllib.py2
1 files changed, 2 insertions, 0 deletions
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]