windows: fix an issue causing registry config paths to be ignored on py3 stable 5.2.1
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 30 Nov 2019 02:13:56 -0500
branchstable
changeset 43453 a50fecefa691
parent 43452 5470e63686ca
child 43454 8849d06363f0
windows: fix an issue causing registry config paths to be ignored on py3 `util.lookupreg()` returns bytes. Differential Revision: https://phab.mercurial-scm.org/D7532
mercurial/scmwindows.py
--- a/mercurial/scmwindows.py	Mon Dec 02 10:18:18 2019 +0100
+++ b/mercurial/scmwindows.py	Sat Nov 30 02:13:56 2019 -0500
@@ -37,7 +37,7 @@
     value = util.lookupreg(
         b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE
     )
-    if not isinstance(value, str) or not value:
+    if not isinstance(value, bytes) or not value:
         return rcpath
     value = util.localpath(value)
     for p in value.split(pycompat.ospathsep):