fixeria has submitted this change. (
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/33139 )
Change subject: osmoutil: return proc's return code from end_proc()
......................................................................
osmoutil: return proc's return code from end_proc()
Change-Id: I1e11fcb6c5a587c27fc00920b6e157862d972fd9
Related: OS#5665
---
M osmopy/osmoutil.py
1 file changed, 13 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
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 @@
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 @@
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."""
--
To view, visit
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/33139
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: I1e11fcb6c5a587c27fc00920b6e157862d972fd9
Gerrit-Change-Number: 33139
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged