Tidy code, fix typo
authorBryan O'Sullivan <bos@serpentine.com>
Wed, 09 Apr 2008 15:27:57 -0700
changeset 6500 a3175cd7dbec
parent 6499 479847ccabe0
child 6501 4f7feeb6d6ee
Tidy code, fix typo
mercurial/util.py
--- a/mercurial/util.py	Thu Dec 20 20:02:51 2007 +0000
+++ b/mercurial/util.py	Wed Apr 09 15:27:57 2008 -0700
@@ -569,12 +569,13 @@
     Defaults to $HG or 'hg' in the search path.
     """
     if _hgexecutable is None:
-        if os.environ.has_key('HG'):
-            set_hgexecutable(os.environ.get('HG'))
+        hg = os.environ.get('HG')
+        if hg:
+            set_hgexecutable(hg)
         elif main_is_frozen():
             set_hgexecutable(sys.executable)
         else:
-            sel_hgexecutable(find_exe('hg', 'hg'))
+            set_hgexecutable(find_exe('hg', 'hg'))
     return _hgexecutable
 
 def set_hgexecutable(path):