commit | c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Dec 02 20:26:21 1997 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Dec 02 20:26:21 1997 +0000 |
tree | 2844053f34c51ae5c94ced9b81d99510e2016fce | |
parent | 240ddc8a68ab3a35ed0e1bfe030debaa6bc7ecb6 [diff] |
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]