Commit 5d27c771 authored by Sigmund Augdal's avatar Sigmund Augdal

Only catch log unhandled exceptions that are subclasses of Exception

This should fix scary looking log entries during normal shutdown
parent cb7a69fb
......@@ -136,7 +136,7 @@ def daemon_main(args):
try:
generator = Generator(args.etcd_host, args.cert, args.key, args.cacert, args.logfile)
generator.main()
except:
except Exception:
logging.exception("Unhandled exception")
......
......@@ -283,7 +283,7 @@ def daemon_main(args):
generator = Generator(args.cert, args.key, args.cacert, args.logfile, noop=args.noop,
etcd_host=args.etcd_host)
generator.main()
except:
except Exception:
logging.exception("Unhandled exception")
......
......@@ -58,7 +58,7 @@ def main(logfile, interface):
def daemon_main(args):
try:
main(args.logfile, args.interface)
except:
except Exception:
logging.exception("Unhandled exception")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment