mirror of
https://github.com/YosysHQ/sby.git
synced 2025-10-04 00:33:58 +00:00
Don't use python asserts to handle unexpected solver output
This commit is contained in:
parent
e99884e319
commit
d0c59a3155
4 changed files with 27 additions and 24 deletions
|
@ -52,6 +52,7 @@ class SbyProc:
|
|||
self.finished = False
|
||||
self.terminated = False
|
||||
self.checkretcode = False
|
||||
self.retcodes = [0]
|
||||
self.task = task
|
||||
self.info = info
|
||||
self.deps = deps
|
||||
|
@ -199,7 +200,7 @@ class SbyProc:
|
|||
self.task.terminate()
|
||||
return
|
||||
|
||||
if self.checkretcode and self.p.returncode != 0:
|
||||
if self.checkretcode and self.p.returncode not in self.retcodes:
|
||||
self.task.status = "ERROR"
|
||||
if not self.silent:
|
||||
self.task.log(f"{self.info}: task failed. ERROR.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue