projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Since this thing is on the innerwebs I suppose it should have a
[python_utils.git]
/
exec_utils.py
diff --git
a/exec_utils.py
b/exec_utils.py
index df273352bb793d59f19717c9cb6806134dd5a628..ae406ef41e925ddbd9ba5483ca1312b5686449e3 100644
(file)
--- a/
exec_utils.py
+++ b/
exec_utils.py
@@
-1,5
+1,9
@@
#!/usr/bin/env python3
#!/usr/bin/env python3
+# © Copyright 2021-2022, Scott Gasch
+
+"""Helper methods concerned with executing subprocesses."""
+
import atexit
import logging
import os
import atexit
import logging
import os
@@
-137,7
+141,7
@@
def cmd_in_background(command: str, *, silent: bool = False) -> subprocess.Popen
def kill_subproc() -> None:
try:
if subproc.poll() is None:
def kill_subproc() -> None:
try:
if subproc.poll() is None:
- logger.info(
f'At exit handler: killing {subproc} ({command})'
)
+ logger.info(
'At exit handler: killing %s (%s)', subproc, command
)
subproc.terminate()
subproc.wait(timeout=10.0)
except BaseException as be:
subproc.terminate()
subproc.wait(timeout=10.0)
except BaseException as be: