server: use pycompat to get argv
authorAugie Fackler <raf@durin42.com>
Sun, 28 May 2017 15:43:26 -0400
changeset 32530 3f0936b2cea9
parent 32529 0ec17613582c
child 32531 7236facefd4f
server: use pycompat to get argv
mercurial/server.py
--- a/mercurial/server.py	Sun May 28 13:27:29 2017 -0400
+++ b/mercurial/server.py	Sun May 28 15:43:26 2017 -0400
@@ -8,7 +8,6 @@
 from __future__ import absolute_import
 
 import os
-import sys
 import tempfile
 
 from .i18n import _
@@ -19,6 +18,7 @@
     commandserver,
     error,
     hgweb,
+    pycompat,
     util,
 )
 
@@ -42,7 +42,7 @@
         os.close(lockfd)
         try:
             if not runargs:
-                runargs = util.hgcmd() + sys.argv[1:]
+                runargs = util.hgcmd() + pycompat.sysargv[1:]
             runargs.append('--daemon-postexec=unlink:%s' % lockpath)
             # Don't pass --cwd to the child process, because we've already
             # changed directory.