##// END OF EJS Templates
py3: use pycompat.sysargv in scmposix.systemrcpath()...
Pulkit Goyal -
r30467:5b0baa9f default
parent child Browse files
Show More
@@ -9,6 +9,7 b' import sys'
9 from . import (
9 from . import (
10 encoding,
10 encoding,
11 osutil,
11 osutil,
12 pycompat,
12 )
13 )
13
14
14 def _rcfiles(path):
15 def _rcfiles(path):
@@ -30,7 +31,7 b' def systemrcpath():'
30 root = 'etc/mercurial'
31 root = 'etc/mercurial'
31 # old mod_python does not set sys.argv
32 # old mod_python does not set sys.argv
32 if len(getattr(sys, 'argv', [])) > 0:
33 if len(getattr(sys, 'argv', [])) > 0:
33 p = os.path.dirname(os.path.dirname(sys.argv[0]))
34 p = os.path.dirname(os.path.dirname(pycompat.sysargv[0]))
34 if p != '/':
35 if p != '/':
35 path.extend(_rcfiles(os.path.join(p, root)))
36 path.extend(_rcfiles(os.path.join(p, root)))
36 path.extend(_rcfiles('/' + root))
37 path.extend(_rcfiles('/' + root))
General Comments 0
You need to be logged in to leave comments. Login now