diff options
author | Gregory P. Smith <greg@krypto.org> | 2015-04-07 23:11:33 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2015-04-07 23:11:33 (GMT) |
commit | cb6fdf2c63961e8b9111357ca57c3de27d029820 (patch) | |
tree | c30bdf14df4aa2ffeaf6860d76c2bd4356746614 /Lib/subprocess.py | |
parent | ace55865c5a528d4d2711c468c5da649fa20c4b1 (diff) | |
download | cpython-cb6fdf2c63961e8b9111357ca57c3de27d029820.zip cpython-cb6fdf2c63961e8b9111357ca57c3de27d029820.tar.gz cpython-cb6fdf2c63961e8b9111357ca57c3de27d029820.tar.bz2 |
issue10838: Rename the subprocess.mswindows internal global to _mswindows.
It is internal only, not a documented API.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 1c7eb9e..e92928e 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -356,7 +356,7 @@ Popen(["/bin/mycmd", "myarg"], env={"PATH": "/usr/bin"}) """ import sys -mswindows = (sys.platform == "win32") +_mswindows = (sys.platform == "win32") import io import os @@ -399,7 +399,7 @@ class TimeoutExpired(SubprocessError): (self.cmd, self.timeout)) -if mswindows: +if _mswindows: import threading import msvcrt import _winapi @@ -438,7 +438,7 @@ __all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call", "getstatusoutput", # NOTE: We intentionally exclude list2cmdline as it is # considered an internal implementation detail. issue10838. -if mswindows: +if _mswindows: from _winapi import (CREATE_NEW_CONSOLE, CREATE_NEW_PROCESS_GROUP, STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, STD_ERROR_HANDLE, SW_HIDE, @@ -765,7 +765,7 @@ class Popen(object): if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") - if mswindows: + if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") @@ -825,7 +825,7 @@ class Popen(object): # quickly terminating child could make our fds unwrappable # (see #8458). - if mswindows: + if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: @@ -1002,7 +1002,7 @@ class Popen(object): raise TimeoutExpired(self.args, orig_timeout) - if mswindows: + if _mswindows: # # Windows methods # |