# HG changeset patch # User efiring@manini.soest.hawaii.edu # Date 1138064351 -46800 # Node ID ae61937c61c567df26157d7c760f88ebdd5e9f48 # Parent f49f602fae9280140cc8a61c97d8bae0c8d7a424 Fix rcpath for hgwebdir case (sys.argv is empty) diff -r f49f602fae92 -r ae61937c61c5 mercurial/util.py --- a/mercurial/util.py Tue Jan 24 13:59:01 2006 +1300 +++ b/mercurial/util.py Tue Jan 24 13:59:11 2006 +1300 @@ -544,7 +544,9 @@ if f.endswith(".rc")]) except OSError, inst: pass return rcs - rcpath = rcfiles(os.path.dirname(sys.argv[0]) + '/../etc/mercurial') + rcpath = [] + if len(sys.argv) > 0: + rcpath.extend(rcfiles(os.path.dirname(sys.argv[0]) + '/../etc/mercurial')) rcpath.extend(rcfiles('/etc/mercurial')) rcpath.append(os.path.expanduser('~/.hgrc')) rcpath = [os.path.normpath(f) for f in rcpath]