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 02edb3b..a16529a 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -323,6 +323,8 @@
 		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]