Skip to content

Commit 693e9cd

Browse files
Handle KeyboardInterrupt
1 parent 993cd50 commit 693e9cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/finn/builder/build_dataflow.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,14 @@ def build_dataflow_cfg(model_filename, cfg: DataflowBuildConfig):
251251
console.print(f"[red]Error: {str(ue)}")
252252
print("Build failed")
253253
return -1
254+
except KeyboardInterrupt:
255+
console.print("[red]Aborting...")
256+
print("Build failed")
257+
return -1
254258
except: # noqa
255259
# print exception info and traceback
256260
extype, value, tb = sys.exc_info()
261+
console.print("[red]Internal Compiler Error:")
257262
console.print_exception(show_locals=False)
258263
# start postmortem debug if configured
259264
if cfg.enable_build_pdb_debug:

0 commit comments

Comments
 (0)