diff options
Diffstat (limited to 'Lib/urlopen.py')
-rwxr-xr-x | Lib/urlopen.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/urlopen.py b/Lib/urlopen.py index 0f3c33a..47f0f20 100755 --- a/Lib/urlopen.py +++ b/Lib/urlopen.py @@ -169,6 +169,7 @@ class URLopener: # Use FTP protocol def open_ftp(self, url): host, file = splithost(url) + if not host: raise IOError, ('ftp error', 'no host given') host, port = splitport(host) host = socket.gethostbyname(host) if not port: |