diff options
author | Guido van Rossum <guido@python.org> | 1997-12-02 20:26:21 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-02 20:26:21 +0000 |
commit | c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4 (patch) | |
tree | 2844053f34c51ae5c94ced9b81d99510e2016fce /Lib/urllib.py | |
parent | 240ddc8a68ab3a35ed0e1bfe030debaa6bc7ecb6 (diff) | |
download | cpython-git-c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4.tar.gz |
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 02edb3b265..a16529a5fc 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] |