fixeria submitted this change.
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(-)
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 change 33139. To unsubscribe, or for help writing mail filters, visit settings.