# HG changeset patch # User Shun-ichi GOTO # Date 1147362516 25200 # Node ID 20cf545b47254a358b992cd114e352da4cee6bc2 # Parent 56fddd98fef5e5fdf042e2745960689452e6d667 Check existance of sys.argv for the use from mod_python. diff --git a/mercurial/util.py b/mercurial/util.py --- 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'))