Handle KeyboardInterrupt and process return code in the main.

This commit is contained in:
Fabio Manganiello 2023-08-13 23:55:40 +02:00
parent 8819a0ed4c
commit c11bc69a66
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -321,7 +321,18 @@ def main(*args: str):
Application entry point.
"""
app = Application.from_cmdline(args)
app.run()
try:
app.run()
except KeyboardInterrupt:
pass
log.info('Application stopped')
return 0
if __name__ == '__main__':
sys.exit(main(*sys.argv[1:]))
# vim:sw=4:ts=4:et: