forked from VimPlug/jedi
CREATE_NO_WINDOW was introduced in Python 3.7 and didn't exist before
This commit is contained in:
@@ -507,5 +507,10 @@ class GeneralizedPopen(subprocess.Popen):
|
|||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
creation_flags = 0
|
creation_flags = 0
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
creation_flags = subprocess.CREATE_NO_WINDOW
|
try:
|
||||||
|
# Was introduced in Python 3.7.
|
||||||
|
CREATE_NO_WINDOW = subprocess.CREATE_NO_WINDOW
|
||||||
|
except AttributeError:
|
||||||
|
CREATE_NO_WINDOW = 0x08000000
|
||||||
|
creation_flags = CREATE_NO_WINDOW
|
||||||
super(GeneralizedPopen, self).__init__(*args, creationflags=creation_flags, **kwargs)
|
super(GeneralizedPopen, self).__init__(*args, creationflags=creation_flags, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user