match: suppress error about subscripting an exception
authorAugie Fackler <augie@google.com>
Wed, 06 Nov 2019 15:42:12 -0500
changeset 43533 6ff196d2553b
parent 43532 da9ecbb10368
child 43534 3b581ad59459
match: suppress error about subscripting an exception I get the sense I should file a bug about subscripting Exception subclasses. Differential Revision: https://phab.mercurial-scm.org/D7286
mercurial/match.py
--- a/mercurial/match.py	Wed Nov 06 15:35:44 2019 -0500
+++ b/mercurial/match.py	Wed Nov 06 15:42:12 2019 -0500
@@ -345,7 +345,10 @@
                 ):
                     kindpats.append((k, p, source or pat))
             except error.Abort as inst:
-                raise error.Abort(b'%s: %s' % (pat, inst[0]))
+                raise error.Abort(
+                    b'%s: %s'
+                    % (pat, inst[0])  # pytype: disable=unsupported-operands
+                )
             except IOError as inst:
                 if warn:
                     warn(