comparison mercurial/httprepo.py @ 3399:5dbb3a991bbf

Catch python2.3's IndexError with bogus http proxy settings. (issue203)
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 15 Oct 2006 21:09:56 +0200
parents 53e843840349
children 3505fcd5a231
comparison
equal deleted inserted replaced
3398:0f308690bda8 3399:5dbb3a991bbf
228 raise 228 raise
229 except httplib.HTTPException, inst: 229 except httplib.HTTPException, inst:
230 self.ui.debug(_('http error while sending %s command\n') % cmd) 230 self.ui.debug(_('http error while sending %s command\n') % cmd)
231 self.ui.print_exc() 231 self.ui.print_exc()
232 raise IOError(None, inst) 232 raise IOError(None, inst)
233 except IndexError:
234 # this only happens with Python 2.3, later versions raise URLError
235 raise util.Abort(_('http error, possibly caused by proxy setting'))
233 try: 236 try:
234 proto = resp.getheader('content-type') 237 proto = resp.getheader('content-type')
235 except AttributeError: 238 except AttributeError:
236 proto = resp.headers['content-type'] 239 proto = resp.headers['content-type']
237 240