diff options
author | Guido van Rossum <guido@python.org> | 1997-12-02 20:26:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-02 20:26:21 (GMT) |
commit | c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4 (patch) | |
tree | 2844053f34c51ae5c94ced9b81d99510e2016fce /Lib/urllib.py | |
parent | 240ddc8a68ab3a35ed0e1bfe030debaa6bc7ecb6 (diff) | |
download | cpython-c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4.zip cpython-c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4.tar.gz cpython-c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4.tar.bz2 |
When a port is specified in an ftp:// URL, must convert it to a number!
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 2 |
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] |