Fix Popen override

This commit is contained in:
Alan Hamlett 2022-01-06 07:56:45 -08:00
parent 033c07f070
commit e337afcc53

View File

@ -105,8 +105,8 @@ class Popen(subprocess.Popen):
"""Patched Popen to prevent opening cmd window on Windows platform.""" """Patched Popen to prevent opening cmd window on Windows platform."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
if is_win:
startupinfo = kwargs.get('startupinfo') startupinfo = kwargs.get('startupinfo')
if is_win or True:
try: try:
startupinfo = startupinfo or subprocess.STARTUPINFO() startupinfo = startupinfo or subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW