mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-15 09:25:31 +00:00
Add note to bad schema exception
Requires python >= 3.11 (oss-cad-suite is 3.11.6, but there isn't any minimum python version given for SBY that I can find). Makes the error less opaque (even though it still has the trace), which I think is necessary given that using the status db is totally optional and otherwise using a different version of SBY with an extra db field in a directory where a previous version has run will just crash with an obscure sqlite3.OperationalError.
This commit is contained in:
parent
b1d9bcbb42
commit
a64f29de6c
1 changed files with 3 additions and 0 deletions
|
@ -69,6 +69,9 @@ def transaction(method: Fn) -> Fn:
|
|||
self.log_debug(f"failed {method.__name__!r} transaction {err}")
|
||||
if not isinstance(err, sqlite3.OperationalError):
|
||||
raise
|
||||
if re.match("table \w+ has no column named \w+", err.args[0]):
|
||||
err.add_note("SBY status database can be reset with --statusreset")
|
||||
raise
|
||||
else:
|
||||
self.log_debug(f"comitted {method.__name__!r} transaction")
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue