From patchwork Fri Mar 2 14:50:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2541: verify: fix exception formatting bug in Python 3 From: phabricator X-Patchwork-Id: 28667 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Fri, 2 Mar 2018 14:50:24 +0000 durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2541 AFFECTED FILES mercurial/verify.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/verify.py b/mercurial/verify.py --- a/mercurial/verify.py +++ b/mercurial/verify.py @@ -70,8 +70,7 @@ self.errors += 1 def exc(self, linkrev, msg, inst, filename=None): - if not str(inst): - inst = repr(inst) + inst = util.forcebytestr(inst) self.err(linkrev, "%s: %s" % (msg, inst), filename) def checklog(self, obj, name, linkrev):