publish update.py
This commit is contained in:
parent
e34d6a1476
commit
6262630705
1 changed files with 11 additions and 0 deletions
11
update.py
11
update.py
|
|
@ -27,6 +27,17 @@ import socket
|
|||
import subprocess
|
||||
import sys
|
||||
|
||||
# Suppress flashing console windows from child processes (powershell/git/pip/tesseract).
|
||||
if os.name == "nt":
|
||||
_CREATE_NO_WINDOW = 0x08000000
|
||||
_orig_popen_init = subprocess.Popen.__init__
|
||||
|
||||
def _popen_no_window(self, *a, **k):
|
||||
k["creationflags"] = k.get("creationflags", 0) | _CREATE_NO_WINDOW
|
||||
_orig_popen_init(self, *a, **k)
|
||||
|
||||
subprocess.Popen.__init__ = _popen_no_window
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
WIN = os.name == "nt"
|
||||
TASK = "EveWatcher"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue