[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-90-g44ba4fd

jturney-9JcytcrH/[email protected]
Newsgroups gmane.os.cygwin.cvs.apps
Message-ID <[email protected]>


https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=44ba4fdab425a806f6c662a1c193f3b9d7d0c994

commit 44ba4fdab425a806f6c662a1c193f3b9d7d0c994
Author: Jon Turney <[email protected]>
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")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.