mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-10-21 02:58:45 +00:00
#1223 fixes, timeout for downloads
This commit is contained in:
1 parent
a6177fec87
commit
bf07b42f88
4 files changed
+55
-30
No files matched your search
@@ -34,6 +34,7 @@ def _run_quiet(cmd: List[str]) -> bool:
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL,
|
||||
timeout=15,
|
||||
env=relaunch_env(),
|
||||
).returncode == 0
|
||||
except (OSError, subprocess.SubprocessError):
|
||||
return False
|
||||
@@ -107,6 +108,7 @@ def _run_install(cmd: List[str], log: Optional[logging.Logger] = None) -> Option
|
||||
proc = subprocess.run(
|
||||
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
timeout=_INSTALL_TIMEOUT_SEC,
|
||||
env=relaunch_env(),
|
||||
)
|
||||
if proc.returncode == 0:
|
||||
return None
|
||||
|
||||
Reference in new issue
Block a user