changeset 2261:20cf545b4725

Check existance of sys.argv for the use from mod_python.
author Shun-ichi GOTO <shunichi.goto@gmail.com>
date Thu, 11 May 2006 08:48:36 -0700
parents 56fddd98fef5
children 3d48eb68f3ee
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Tue May 09 14:40:13 2006 -0700
+++ b/mercurial/util.py	Thu May 11 08:48:36 2006 -0700
@@ -588,7 +588,7 @@
     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'))