# HG changeset patch # User Thomas Arendsen Hein # Date 1160939396 -7200 # Node ID 5dbb3a991bbf722b4aa4a37dc33d3f8d4fc8c2b8 # Parent 0f308690bda8f51730de5ce3e9aadae79bf80c97 Catch python2.3's IndexError with bogus http proxy settings. (issue203) diff -r 0f308690bda8 -r 5dbb3a991bbf mercurial/httprepo.py --- a/mercurial/httprepo.py Sun Oct 15 20:56:38 2006 +0200 +++ b/mercurial/httprepo.py Sun Oct 15 21:09:56 2006 +0200 @@ -230,6 +230,9 @@ self.ui.debug(_('http error while sending %s command\n') % cmd) self.ui.print_exc() raise IOError(None, inst) + except IndexError: + # this only happens with Python 2.3, later versions raise URLError + raise util.Abort(_('http error, possibly caused by proxy setting')) try: proto = resp.getheader('content-type') except AttributeError: