util: always define a dummy lookup_reg()
authorPatrick Mezard <pmezard@gmail.com>
Wed, 13 Feb 2008 23:09:28 +0100
changeset 6132 1ee95f7df611
parent 6131 fddeeb00f8d1
child 6135 be91a77b7f18
util: always define a dummy lookup_reg()
mercurial/util.py
--- a/mercurial/util.py	Sat Feb 16 11:55:33 2008 +0100
+++ b/mercurial/util.py	Wed Feb 13 23:09:28 2008 +0100
@@ -901,6 +901,9 @@
     '''Are we running in a GUI?'''
     return os.name == "nt" or os.name == "mac" or os.environ.get("DISPLAY")
 
+def lookup_reg(key, name=None, scope=None):
+    return None
+
 # Platform specific variants
 if os.name == 'nt':
     import msvcrt
@@ -1092,9 +1095,6 @@
 else:
     nulldev = '/dev/null'
 
-    def lookup_reg(key, name=None, scope=None):
-        return None
-
     def rcfiles(path):
         rcs = [os.path.join(path, 'hgrc')]
         rcdir = os.path.join(path, 'hgrc.d')