commit d00a61c31d60f781f8e795a10bf0187c6a722a54 Author: Damian Johnson atagar@torproject.org Date: Mon Jan 16 10:44:14 2017 -0800
Pick dry-run status based on user
Rather than hardcoding this flag to True when developing why not simply base it on our user? The doctor virt is usually the only place we want this to be 'False'. --- util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util.py b/util.py index 9d4adcb..fc9601c 100644 --- a/util.py +++ b/util.py @@ -2,6 +2,7 @@ Module for issuing email notifications to me via gmail. """
+import getpass import logging import os import socket @@ -17,7 +18,7 @@ FROM_ADDRESS = 'atagar@torproject.org' TO_ADDRESSES = ['tor-consensus-health@lists.torproject.org'] ERROR_ADDRESS = 'atagar@torproject.org'
-TEST_RUN = False # print script results rather than emailing +TEST_RUN = getpass.getuser() != 'doctor' # print script results rather than emailing
def get_path(*comp):
tor-commits@lists.torproject.org