Commit faebc65a authored by Guido van Rossum's avatar Guido van Rossum

When a port is specified in an ftp:// URL, must convert it to a number!

parent a706495b
...@@ -323,6 +323,8 @@ class URLopener: ...@@ -323,6 +323,8 @@ class URLopener:
if not port: if not port:
import ftplib import ftplib
port = ftplib.FTP_PORT port = ftplib.FTP_PORT
else:
port = int(port)
path, attrs = splitattr(path) path, attrs = splitattr(path)
dirs = string.splitfields(path, '/') dirs = string.splitfields(path, '/')
dirs, file = dirs[:-1], dirs[-1] dirs, file = dirs[:-1], dirs[-1]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment