mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
Fix Popen override
This commit is contained in:
parent
033c07f070
commit
e337afcc53
@ -105,14 +105,14 @@ 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):
|
||||||
startupinfo = kwargs.get('startupinfo')
|
if is_win:
|
||||||
if is_win or True:
|
startupinfo = kwargs.get('startupinfo')
|
||||||
try:
|
try:
|
||||||
startupinfo = startupinfo or subprocess.STARTUPINFO()
|
startupinfo = startupinfo or subprocess.STARTUPINFO()
|
||||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
kwargs['startupinfo'] = startupinfo
|
kwargs['startupinfo'] = startupinfo
|
||||||
super(Popen, self).__init__(*args, **kwargs)
|
super(Popen, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user