diff options
author | Christian Tismer <tismer@stackless.com> | 2015-09-17 11:41:10 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2015-09-17 11:41:10 +0200 |
commit | d565814858c58406567e6618aaeea6ccffbf69e9 (patch) | |
tree | c24d6cd598fef5728e946a7a2f950c9e6dcad018 | |
parent | 31660d0e0a3a0270c586809df5924af2ccbf79db (diff) | |
parent | 9c63384d3e7453c518e55094f5b8639fd0cbcfb5 (diff) |
Merge pull request #2 from empyrical/patch-1
Fix subprocess.mswindows check for Python 3.5
-rw-r--r-- | popenasync.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/popenasync.py b/popenasync.py index df4944ee7..eb1a238fc 100644 --- a/popenasync.py +++ b/popenasync.py @@ -23,7 +23,9 @@ if sys.version_info >= (3,): else: null_byte = '\x00' -if subprocess.mswindows: +mswindows = (sys.platform == "win32") + +if mswindows: if sys.version_info >= (3,): # Test date should be in ascii. def encode(s): @@ -142,7 +144,7 @@ class Popen(subprocess.Popen): getattr(self, which).close() setattr(self, which, None) - if subprocess.mswindows: + if mswindows: def kill(self): # Recipes #http://me.in-berlin.de/doc/python/faq/windows.html#how-do-i-emulate-os-kill-in-windows |