changeset 30667:5861bdbeb9a3

py3: use pycompat.getcwd instead of os.getcwd
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 22 Dec 2016 01:54:17 +0530
parents 6ada1658fc6b
children 3fcaf0f660ce
files mercurial/win32.py tests/test-check-code.t
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/win32.py	Wed Dec 21 23:40:38 2016 +0530
+++ b/mercurial/win32.py	Thu Dec 22 01:54:17 2016 +0530
@@ -14,7 +14,10 @@
 import random
 import subprocess
 
-from . import encoding
+from . import (
+    encoding,
+    pycompat,
+)
 
 _kernel32 = ctypes.windll.kernel32
 _advapi32 = ctypes.windll.advapi32
@@ -440,7 +443,7 @@
 
     res = _kernel32.CreateProcessA(
         None, args, None, None, False, _CREATE_NO_WINDOW,
-        env, os.getcwd(), ctypes.byref(si), ctypes.byref(pi))
+        env, pycompat.getcwd(), ctypes.byref(si), ctypes.byref(pi))
     if not res:
         raise ctypes.WinError()
 
--- a/tests/test-check-code.t	Wed Dec 21 23:40:38 2016 +0530
+++ b/tests/test-check-code.t	Thu Dec 22 01:54:17 2016 +0530
@@ -31,9 +31,6 @@
    > policy = os.environ.get('HGMODULEPOLICY', policy)
    use encoding.environ instead (py3)
   Skipping mercurial/statprof.py it has no-che?k-code (glob)
-  mercurial/win32.py:443:
-   >         env, os.getcwd(), ctypes.byref(si), ctypes.byref(pi))
-   use pycompat.getcwd instead (py3)
   [1]
 
 @commands in debugcommands.py should be in alphabetical order.