Add URL to all URLErrors
This commit is contained in:
parent
e771a0ed53
commit
3d5834c522
|
@ -47,12 +47,9 @@ class RefineServer(object):
|
|||
try:
|
||||
response = urllib2.urlopen(req)
|
||||
except urllib2.URLError as (url_error,):
|
||||
if 'Connection refused' in url_error:
|
||||
raise urllib2.URLError(
|
||||
'%s for %s. No Refine server reachable/running; ENV set?' %
|
||||
(url_error, self.server))
|
||||
else:
|
||||
raise
|
||||
raise urllib2.URLError(
|
||||
'%s for %s. No Refine server reachable/running; ENV set?' %
|
||||
(url_error, self.server))
|
||||
if response.info().get('Content-Encoding', None) == 'gzip':
|
||||
# Need a seekable filestream for gzip
|
||||
gzip_fp = gzip.GzipFile(fileobj=StringIO.StringIO(response.read()))
|
||||
|
|
Loading…
Reference in New Issue