scmutil: use _winreg.HKEY_LOCAL_MACHINE
authorAdrian Buehlmann <adrian@cadifra.com>
Sun, 27 May 2012 11:30:03 +0200
changeset 16808 572d5e254f20
parent 16807 80142f385af9
child 16809 6b704fa2bea1
scmutil: use _winreg.HKEY_LOCAL_MACHINE
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Sun May 27 11:29:52 2012 +0200
+++ b/mercurial/scmutil.py	Sun May 27 11:30:03 2012 +0200
@@ -465,7 +465,7 @@
 
 else:
 
-    _HKEY_LOCAL_MACHINE = 0x80000002L
+    import _winreg
 
     def systemrcpath():
         '''return default os-specific hgrc search path'''
@@ -485,7 +485,7 @@
             return rcpath
         # else look for a system rcpath in the registry
         value = util.lookupreg('SOFTWARE\\Mercurial', None,
-                               _HKEY_LOCAL_MACHINE)
+                               _winreg.HKEY_LOCAL_MACHINE)
         if not isinstance(value, str) or not value:
             return rcpath
         value = util.localpath(value)