# HG changeset patch # User Matt Harbison # Date 2019-11-20 14:55:59 # Node ID 1d1232c0726ff0760547d580c4cb9622ac98ab8b # Parent 4330851947fb9cd9405936749cf4469ab9fd8ff9 wireprotov1server: capture Abort type before accessing the `hint` attribute Although the previous code worked, pytypes complained because `exc` is caught above as `BundleValueError, Abort, PushRaced`, and the other two don't have this attribute. Differential Revision: https://phab.mercurial-scm.org/D7463 diff --git a/mercurial/wireprotov1server.py b/mercurial/wireprotov1server.py --- a/mercurial/wireprotov1server.py +++ b/mercurial/wireprotov1server.py @@ -679,7 +679,7 @@ def unbundle(repo, proto, heads): if not getattr(exc, 'duringunbundle2', False): try: raise - except error.Abort: + except error.Abort as exc: # The old code we moved used procutil.stderr directly. # We did not change it to minimise code change. # This need to be moved to something proper.