comparison mercurial/httprepo.py @ 11567:34cc8b84407f

removed exception args indexing (not supported by py3k) Py3k removed __getitem__ for exception classes. The correct way of getting the exception arguments is by using the args method.
author Renato Cunha <renatoc@gmail.com>
date Wed, 14 Jul 2010 23:03:21 -0300
parents db3f6f0e4e7d
children a036f6bd1da3
comparison
equal deleted inserted replaced
11566:4d11fde55cc5 11567:34cc8b84407f
247 _('push failed (unexpected response):'), resp) 247 _('push failed (unexpected response):'), resp)
248 for l in output.splitlines(True): 248 for l in output.splitlines(True):
249 self.ui.status(_('remote: '), l) 249 self.ui.status(_('remote: '), l)
250 return ret 250 return ret
251 except socket.error, err: 251 except socket.error, err:
252 if err[0] in (errno.ECONNRESET, errno.EPIPE): 252 if err.args[0] in (errno.ECONNRESET, errno.EPIPE):
253 raise util.Abort(_('push failed: %s') % err[1]) 253 raise util.Abort(_('push failed: %s') % err.args[1])
254 raise util.Abort(err[1]) 254 raise util.Abort(err.args[1])
255 finally: 255 finally:
256 fp.close() 256 fp.close()
257 os.unlink(tempname) 257 os.unlink(tempname)
258 258
259 def stream_out(self): 259 def stream_out(self):