aboutsummaryrefslogtreecommitdiff
path: root/audiobook_converter.py
diff options
context:
space:
mode:
Diffstat (limited to 'audiobook_converter.py')
-rw-r--r--audiobook_converter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/audiobook_converter.py b/audiobook_converter.py
index bb21e64..d2e7f41 100644
--- a/audiobook_converter.py
+++ b/audiobook_converter.py
@@ -101,14 +101,17 @@ Examples:
skip_transcription=args.no_transcription,
speed=args.speed,
)
- converter.run()
+ ok = converter.run()
except KeyboardInterrupt:
print("\n[WARNING] Shutdown requested by user")
+ sys.exit(130)
except Exception as exc:
print(f"[FATAL] Fatal error: {exc}")
traceback.print_exc()
sys.exit(1)
+ sys.exit(0 if ok else 1)
+
if __name__ == "__main__":
main()