error: fix isinstnace check to use bytes instead of str
authorAugie Fackler <augie@google.com>
Thu, 01 Mar 2018 18:05:47 -0500
changeset 36541 c6a7b99f150a
parent 36540 496875e6d541
child 36542 106e93d16435
error: fix isinstnace check to use bytes instead of str Differential Revision: https://phab.mercurial-scm.org/D2528
mercurial/error.py
--- a/mercurial/error.py	Sun Feb 25 22:43:50 2018 -0500
+++ b/mercurial/error.py	Thu Mar 01 18:05:47 2018 -0500
@@ -47,7 +47,7 @@
         # this can't be called 'message' because at least some installs of
         # Python 2.6+ complain about the 'message' property being deprecated
         self.lookupmessage = message
-        if isinstance(name, str) and len(name) == 20:
+        if isinstance(name, bytes) and len(name) == 20:
             from .node import short
             name = short(name)
         RevlogError.__init__(self, '%s@%s: %s' % (index, name, message))