[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [doctor/master] Sending script error notifications to me rather than the list



commit 94e8566560118a70195c8043a9faf7c33d0302a3
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Thu Sep 5 09:11:47 2013 -0700

    Sending script error notifications to me rather than the list
    
    There's no need to embarras myself by sending scripting errors to
    tor-consensus-health@. Sending those to just myself instead.
---
 consensus_health_checker.py |    2 +-
 descriptor_checker.py       |    2 +-
 sybil_checker.py            |    2 +-
 util.py                     |    5 +++--
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index 14d7e38..856be84 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -571,4 +571,4 @@ if __name__ == '__main__':
   except:
     msg = "consensus_health_checker.py failed with:\n\n%s" % traceback.format_exc()
     log.error(msg)
-    util.send("Script Error", body_text = msg)
+    util.send("Script Error", body_text = msg, destination = util.ERROR_ADDRESS)
diff --git a/descriptor_checker.py b/descriptor_checker.py
index ad907d4..5df9092 100755
--- a/descriptor_checker.py
+++ b/descriptor_checker.py
@@ -97,4 +97,4 @@ if __name__ == '__main__':
   except:
     msg = "descriptor_checker.py failed with:\n\n%s" % traceback.format_exc()
     log.error(msg)
-    util.send("Script Error", body_text = msg)
+    util.send("Script Error", body_text = msg, destination = util.ERROR_ADDRESS)
diff --git a/sybil_checker.py b/sybil_checker.py
index 90538c4..56f344f 100755
--- a/sybil_checker.py
+++ b/sybil_checker.py
@@ -123,4 +123,4 @@ if __name__ == '__main__':
   except:
     msg = "sybil_checker.py failed with:\n\n%s" % traceback.format_exc()
     log.error(msg)
-    util.send("Script Error", body_text = msg)
+    util.send("Script Error", body_text = msg, destination = util.ERROR_ADDRESS)
diff --git a/util.py b/util.py
index b2f0e5e..a1837b7 100644
--- a/util.py
+++ b/util.py
@@ -15,6 +15,7 @@ import stem.util.log
 
 FROM_ADDRESS = 'verelsa@xxxxxxxxx'
 TO_ADDRESS = 'tor-consensus-health@xxxxxxxxxxxxxxxxxxxx'
+ERROR_ADDRESS = 'atagar@xxxxxxxxxxxxxx'
 PASSWORD = None
 
 
@@ -77,7 +78,7 @@ def log_stem_debugging(name):
   log.addHandler(handler)
 
 
-def send(subject, body_text = None, body_html = None, attachment = None):
+def send(subject, body_text = None, body_html = None, attachment = None, destination = TO_ADDRESS):
   """
   Sends an email notification via gmail.
 
@@ -92,7 +93,7 @@ def send(subject, body_text = None, body_html = None, attachment = None):
   msg = MIMEMultipart('alternative')
   msg['Subject'] = subject
   msg['From'] = FROM_ADDRESS
-  msg['To'] = TO_ADDRESS
+  msg['To'] = destination
 
   if body_text:
     msg.attach(MIMEText(body_text, 'plain'))



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits