mercurial/util.py
changeset 2261 20cf545b4725
parent 2237 4a069064a39b
child 2262 3d48eb68f3ee
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -588,7 +588,7 @@ else:
     def os_rcpath():
         '''return default os-specific hgrc search path'''
         path = []
-        if len(sys.argv) > 0:
+        if len(getattr(sys, 'argv', [])) > 0:
             path.extend(rcfiles(os.path.dirname(sys.argv[0]) +
                                   '/../etc/mercurial'))
         path.extend(rcfiles('/etc/mercurial'))