Patchwork D7286: match: suppress error about subscripting an exception

login
register
mail settings
Submitter phabricator
Date Nov. 6, 2019, 11:24 p.m.
Message ID <205534c5cb3e1a47829f89f2be981774@localhost.localdomain>
Download mbox | patch
Permalink /patch/42853/
State Not Applicable
Headers show

Comments

phabricator - Nov. 6, 2019, 11:24 p.m.
durin42 updated this revision to Diff 17671.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7286?vs=17656&id=17671

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7286/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7286

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -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(