diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-06-01 19:59:14 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-06-01 19:59:18 +0700 |
commit | 706e3d9ba568a6075db29ce583c5cf40ff7aa980 (patch) | |
tree | 68ca38394411f199a4ce7f2e63f960b1ff07e70f /osmopy | |
parent | f5e2a84962a48d04943db11040cde4886cf57986 (diff) |
osmoutil: return proc's return code from end_proc()
Change-Id: I1e11fcb6c5a587c27fc00920b6e157862d972fd9
Related: OS#5665
Diffstat (limited to 'osmopy')
-rwxr-xr-x | osmopy/osmoutil.py | 5 |
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.""" |