Mercurial > hg > mercurial-source
diff mercurial/error.py @ 37327:c6a7b99f150a
error: fix isinstnace check to use bytes instead of str
Differential Revision: https://phab.mercurial-scm.org/D2528
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 01 Mar 2018 18:05:47 -0500 (2018-03-01) |
parents | 795bfa2a9103 |
children | fe81af15675a |
line wrap: on
line diff
--- a/mercurial/error.py +++ b/mercurial/error.py @@ -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))