Improve PFERD error handling

This commit is contained in:
Joscha
2021-05-22 21:05:32 +02:00
parent b4d97cd545
commit 9889ce6b57
2 changed files with 32 additions and 40 deletions

View File

@ -115,7 +115,12 @@ def main() -> None:
dump_config(args, config)
exit()
pferd = Pferd(config)
try:
pferd = Pferd(config)
except ConfigOptionError as e:
log.error(str(e))
exit(1)
try:
asyncio.run(pferd.run())
except KeyboardInterrupt: