py3: config values can be bytes, but never unicode
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 11 Jul 2019 14:31:32 -0700
changeset 4744 45afcbfea417
parent 4743 92e3db149d7d
child 4745 854637e3d2d0
py3: config values can be bytes, but never unicode
hgext3rd/evolve/__init__.py
hgext3rd/evolve/serveronly.py
--- a/hgext3rd/evolve/__init__.py	Sat Jul 13 00:17:03 2019 -0700
+++ b/hgext3rd/evolve/__init__.py	Thu Jul 11 14:31:32 2019 -0700
@@ -399,7 +399,7 @@
         repo.ui.setconfig('experimental', 'evolution', evolveopts, 'evolve')
     if obsolete.isenabled(repo, 'exchange'):
         # if no config explicitly set, disable bundle1
-        if not isinstance(repo.ui.config('server', 'bundle1'), str):
+        if not isinstance(repo.ui.config('server', 'bundle1'), bytes):
             repo.ui.setconfig('server', 'bundle1', False)
 
     class trdescrepo(repo.__class__):
--- a/hgext3rd/evolve/serveronly.py	Sat Jul 13 00:17:03 2019 -0700
+++ b/hgext3rd/evolve/serveronly.py	Thu Jul 11 14:31:32 2019 -0700
@@ -59,5 +59,5 @@
         repo.ui.setconfig('experimental', 'evolution', evolveopts)
     if obsolete.isenabled(repo, 'exchange'):
         # if no config explicitly set, disable bundle1
-        if not isinstance(repo.ui.config('server', 'bundle1'), str):
+        if not isinstance(repo.ui.config('server', 'bundle1'), bytes):
             repo.ui.setconfig('server', 'bundle1', False)