fixeria has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/39/33139/1
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."""