aboutsummaryrefslogtreecommitdiffstats
path: root/osmopy
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-06-01 19:59:14 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-06-01 19:59:18 +0700
commit706e3d9ba568a6075db29ce583c5cf40ff7aa980 (patch)
tree68ca38394411f199a4ce7f2e63f960b1ff07e70f /osmopy
parentf5e2a84962a48d04943db11040cde4886cf57986 (diff)
osmoutil: return proc's return code from end_proc()
Diffstat (limited to 'osmopy')
-rwxr-xr-xosmopy/osmoutil.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py
index ecd88f2..6ab16e7 100755
--- a/osmopy/osmoutil.py
+++ b/osmopy/osmoutil.py
@@ -42,9 +42,9 @@ def popen_devnull(cmd, verbose=True):
If the process doesn't appear to exist (for instance, is None), do nothing"""
-def end_proc(proc):
+def end_proc(proc): # -> Optional[int]
if not proc:
- return
+ return None
proc.terminate()
time_to_wait_for_term = 5
@@ -70,6 +70,7 @@ def end_proc(proc):
print("Terminating took %.3fs" % waited_time)
rc = proc.wait()
print("Process returned code: %d" % rc)
+ return rc
"""Add a directory to sys.path, try to import a config file."""