diff options
author | empyrical <empyrical@users.noreply.github.com> | 2015-09-17 02:05:49 -0600 |
---|---|---|
committer | empyrical <empyrical@users.noreply.github.com> | 2015-09-17 02:12:04 -0600 |
commit | 0dd99fb749b6b68a79c7f7a9faaa90595e3be9e2 (patch) | |
tree | fa4ec303a0bbfb90f52fc0182dff8207fd1cb48a | |
parent | 31660d0e0a3a0270c586809df5924af2ccbf79db (diff) |
Fix subprocess.mswindows check for Python 3.5
-rw-r--r-- | popenasync.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/popenasync.py b/popenasync.py index df4944ee7..78ae1cbf3 100644 --- a/popenasync.py +++ b/popenasync.py @@ -23,7 +23,12 @@ if sys.version_info >= (3,): else: null_byte = '\x00' -if subprocess.mswindows: +if hasattr(subprocess, 'mswindows'): + mswindows = subprocess.mswindows +else: + mswindows = subprocess._mswindows + +if mswindows: if sys.version_info >= (3,): # Test date should be in ascii. def encode(s): @@ -142,7 +147,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 |