]> granicus.if.org Git - python/commitdiff
When a port is specified in an ftp:// URL, must convert it to a number!
authorGuido van Rossum <guido@python.org>
Tue, 2 Dec 1997 20:26:21 +0000 (20:26 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 2 Dec 1997 20:26:21 +0000 (20:26 +0000)
Lib/urllib.py

index 02edb3b265aa5bbd3b2ac4c7bea09cc33448bb23..a16529a5fc61a84f94cb1cbd3d28dcf226183d9d 100644 (file)
@@ -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]