This is the mail archive of the
cygwin-apps-cvs
mailing list for the cygwin-apps project.
[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-90-g44ba4fd
- From: jturney at sourceware dot org
- To: cygwin-apps-cvs at sourceware dot org
- Date: 30 Sep 2017 13:54:33 -0000
- Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-90-g44ba4fd
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=44ba4fdab425a806f6c662a1c193f3b9d7d0c994
commit 44ba4fdab425a806f6c662a1c193f3b9d7d0c994
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Fri Sep 29 23:56:52 2017 +0100
Email exception stopping calm daemon, as well as writing it to log
Diff:
---
calm/calm.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/calm/calm.py b/calm/calm.py
index c0558ca..cfffb2f 100755
--- a/calm/calm.py
+++ b/calm/calm.py
@@ -527,7 +527,8 @@ def do_daemon(args, state):
# cancel any pending alarm
signal.alarm(0)
except Exception as e:
- logging.error("exception %s" % (type(e).__name__), exc_info=True)
+ with mail_logs(args.email, toaddrs=args.email, subject='calm stopping due to unhandled exception', thresholdLevel=logging.ERROR) as leads_email:
+ logging.error("exception %s" % (type(e).__name__), exc_info=True)
logging.info("calm daemon stopped")