summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/process.py
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-11-12 18:20:52 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-11-12 18:21:21 +0100
commit78087beaa9dea02f53b4e650051b32d56f1639f3 (patch)
tree7969fd5bf0a76d0f283ac46f41f1b1861ca7f96c /src/osmo_gsm_tester/process.py
parent79df739c07088b1cfc4f42b8c3fe273d84550a0b (diff)
process: launch_sync: allow non success return
Diffstat (limited to 'src/osmo_gsm_tester/process.py')
-rw-r--r--src/osmo_gsm_tester/process.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py
index 40d0cc1..b1769f8 100644
--- a/src/osmo_gsm_tester/process.py
+++ b/src/osmo_gsm_tester/process.py
@@ -77,7 +77,7 @@ class Process(log.Origin):
self.set_name(self.name_str, pid=self.process_obj.pid)
self.log('Launched')
- def launch_sync(self):
+ def launch_sync(self, raise_nonsuccess=True):
'''
calls launch() method and block waiting for it to finish, serving the
mainloop meanwhile.
@@ -88,9 +88,10 @@ class Process(log.Origin):
except Exception as e:
self.terminate()
raise e
- if self.result != 0:
+ if raise_nonsuccess and self.result != 0:
log.ctx(self)
- raise log.Error('Exited in error')
+ raise log.Error('Exited in error %d' % self.result)
+ return self.result
def respawn(self):
self.dbg('respawn')