diff options
| author | Nick Mathewson <nickm@torproject.org> | 2007-04-15 04:56:34 +0000 |
|---|---|---|
| committer | Nick Mathewson <nickm@torproject.org> | 2007-04-15 04:56:34 +0000 |
| commit | 65665bab99ec15c21efed702a8452e40e005dc07 (patch) | |
| tree | 3a971affd246bb584c52b03def13e1c4ee74e8f3 /updateCache.py | |
| parent | 2341dcce301592eedd28972bf61a2eeea6740ef9 (diff) | |
| download | anonbib-65665bab99ec15c21efed702a8452e40e005dc07.tar.gz | |
r12375@catbus: nickm | 2007-04-15 00:56:27 -0400
Catch badly-formatted URLs when downloading, not just URLS that fail when downloading.
svn:r210
Diffstat (limited to 'updateCache.py')
| -rwxr-xr-x | updateCache.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/updateCache.py b/updateCache.py index ad62419..f25ff17 100755 --- a/updateCache.py +++ b/updateCache.py @@ -16,6 +16,7 @@ import urllib2 import getopt import socket import errno +import httplib os.umask(022) @@ -55,6 +56,8 @@ def downloadFile(key, ftype, section, url,timeout=None): try: try: infile = urllib2.urlopen(url) + except httplib.InvalidURL, e: + raise UIError("Invalid URL %s: %s"%(url,e)) except IOError, e: raise UIError("Cannot connect to url %s: %s"%(url,e)) except socket.error, e: |
