Patchwork D7537: githelp: fix a `str` type conditional for py3

login
register
mail settings
Submitter phabricator
Date Nov. 30, 2019, 5:09 p.m.
Message ID <differential-rev-PHID-DREV-uz6l5ozssgygry7d6iii-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43548/
State Superseded
Headers show

Comments

phabricator - Nov. 30, 2019, 5:09 p.m.
mharbison72 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/D7537

AFFECTED FILES
  hgext/githelp.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-devel
phabricator - Dec. 2, 2019, 9:17 a.m.
dlax added a comment.
dlax accepted this revision.


  There is apparently no test coverage for this.

REPOSITORY
  rHG Mercurial

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

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

To: mharbison72, #hg-reviewers, dlax
Cc: dlax, mercurial-devel

Patch

diff --git a/hgext/githelp.py b/hgext/githelp.py
--- a/hgext/githelp.py
+++ b/hgext/githelp.py
@@ -115,7 +115,7 @@ 
     args = list([convert(x) for x in args])
     opts = dict(
         [
-            (k, convert(v)) if isinstance(v, str) else (k, v)
+            (k, convert(v)) if isinstance(v, bytes) else (k, v)
             for k, v in pycompat.iteritems(opts)
         ]
     )