mercurial/statichttprepo.py
changeset 1821 0b3f4be5c5bf
parent 1598 14d1f1868bf6
child 2072 74d3f5336b66
--- a/mercurial/statichttprepo.py	Wed Mar 01 14:52:28 2006 +0100
+++ b/mercurial/statichttprepo.py	Wed Mar 01 15:29:13 2006 +0100
@@ -15,8 +15,10 @@
     def read(self, size=None):
         try:
             return httprangereader.httprangereader.read(self, size)
+        except urllib2.HTTPError, inst:
+            raise IOError(None, inst)
         except urllib2.URLError, inst:
-            raise IOError(None, str(inst))
+            raise IOError(None, inst.reason[1])
 
 def opener(base):
     """return a function that opens files over http"""