diff mercurial/posix.py @ 30647:e995f00a9e9a

py3: replace sys.platform with pycompat.sysplatform (part 2 of 2)
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Dec 2016 02:26:41 +0530
parents 16b5df5792a8
children 13d94304c8da
line wrap: on
line diff
--- a/mercurial/posix.py	Mon Dec 19 02:15:24 2016 +0530
+++ b/mercurial/posix.py	Mon Dec 19 02:26:41 2016 +0530
@@ -80,7 +80,7 @@
 def parsepatchoutput(output_line):
     """parses the output produced by patch and returns the filename"""
     pf = output_line[14:]
-    if os.sys.platform == 'OpenVMS':
+    if pycompat.sysplatform == 'OpenVMS':
         if pf[0] == '`':
             pf = pf[1:-1] # Remove the quotes
     else:
@@ -404,7 +404,7 @@
 
 _needsshellquote = None
 def shellquote(s):
-    if os.sys.platform == 'OpenVMS':
+    if pycompat.sysplatform == 'OpenVMS':
         return '"%s"' % s
     global _needsshellquote
     if _needsshellquote is None:
@@ -423,7 +423,7 @@
 
 def testpid(pid):
     '''return False if pid dead, True if running or not sure'''
-    if os.sys.platform == 'OpenVMS':
+    if pycompat.sysplatform == 'OpenVMS':
         return True
     try:
         os.kill(pid, 0)