scripts: twister: Process KeyboardInterrupt Hardening
If you interrupt process() operation, we want Twister to exit as gracefully as it can. This avoids the UnboundLocalError that could appear e.g. when interrupting the operation via SIGINT. Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This commit is contained in:
parent
4c6b1e5a65
commit
f78949b18c
1 changed files with 3 additions and 2 deletions
|
@ -615,6 +615,9 @@ class ProjectBuilder(FilterBuilder):
|
|||
|
||||
|
||||
def process(self, pipeline, done, message, lock, results):
|
||||
next_op = None
|
||||
additionals = {}
|
||||
|
||||
op = message.get('op')
|
||||
|
||||
self.instance.setup_handler(self.env)
|
||||
|
@ -772,8 +775,6 @@ class ProjectBuilder(FilterBuilder):
|
|||
done.put(self.instance)
|
||||
self.report_out(results)
|
||||
|
||||
next_op = None
|
||||
additionals = {}
|
||||
if not self.options.coverage:
|
||||
if self.options.prep_artifacts_for_testing:
|
||||
next_op = 'cleanup'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue