Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/httprepo.py Wed Jul 14 22:59:57 2010 -0300 +++ b/mercurial/httprepo.py Wed Jul 14 23:03:21 2010 -0300 @@ -249,9 +249,9 @@ self.ui.status(_('remote: '), l) return ret except socket.error, err: - if err[0] in (errno.ECONNRESET, errno.EPIPE): - raise util.Abort(_('push failed: %s') % err[1]) - raise util.Abort(err[1]) + if err.args[0] in (errno.ECONNRESET, errno.EPIPE): + raise util.Abort(_('push failed: %s') % err.args[1]) + raise util.Abort(err.args[1]) finally: fp.close() os.unlink(tempname)