diff mercurial/match.py @ 43533:6ff196d2553b

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
author Augie Fackler <augie@google.com>
date Wed, 06 Nov 2019 15:42:12 -0500
parents 8ff1ecfadcd1
children 9f70512ae2cf
line wrap: on
line diff
--- 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(