summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2011-10-11 09:31:58 -0700
committerShawn O. Pearce <sop@google.com>2011-10-11 09:31:58 -0700
commitbf1fbb20ab33cc479881a2b755e336872971dd78 (patch)
tree753dc46108148ffa4a579a932e599e6b85450f30 /project.py
parent29472463ba601e9c0513eadb19470e435b2601a1 (diff)
downloadgit-repo-bf1fbb20ab33cc479881a2b755e336872971dd78.tar.gz
Fix AttributeError: 'HTTPError' object has no attribute 'reason'v1.7.7.2
Not every version of urllib2 supplies a reason object on the HTTPError exception that it throws from urlopen(). Work around this by using str(e) instead and hope the string formatting includes sufficient information. Change-Id: I0f4586dba0aa7152691b2371627c951f91fdfc8d Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'project.py')
-rw-r--r--project.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/project.py b/project.py
index 76d4d0d5..5f8369d5 100644
--- a/project.py
+++ b/project.py
@@ -1491,7 +1491,7 @@ class Project(object):
1491 msg = '' 1491 msg = ''
1492 raise DownloadError('HTTP %s%s' % (e.code, msg)) 1492 raise DownloadError('HTTP %s%s' % (e.code, msg))
1493 except urllib2.URLError, e: 1493 except urllib2.URLError, e:
1494 raise DownloadError('%s (%s)' % (e.reason, req.get_host())) 1494 raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
1495 1495
1496 p = None 1496 p = None
1497 try: 1497 try: