From 94a553f0f17d3a14d07346e7a9d6f26933e59ba2 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 8 Dec 2012 12:59:40 -0500 Subject: [PATCH] zephyr_mirror: Use a variable for humbug_account_email. (imported from commit 90da406a5eab67d20b42243e96b8afb3e5b5f342) --- bots/zephyr_mirror_backend.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index dc5b3ee..ce42116 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -131,8 +131,8 @@ def send_humbug(zeph): def send_error_humbug(error_msg): message = {"type": "private", - "sender": options.user + "@mit.edu", - "to": options.user + "@mit.edu", + "sender": humbug_account_email, + "to": humbug_account_email, "content": error_msg, } humbug_client.send_message(message) @@ -521,7 +521,7 @@ received it, Zephyr users did not. The error message from zwrite was: %s""" % (heading, stderr, support_closing)) def maybe_forward_to_zephyr(message): - if (message["sender_email"] == options.user + "@mit.edu"): + if (message["sender_email"] == humbug_account_email): if not ((message["type"] == "stream") or (message["type"] == "private" and False not in [u["email"].lower().endswith("mit.edu") for u in @@ -797,9 +797,10 @@ or specify the --api-key-file option.""" % (options.api_key_file,))) # don't need to read it in os.environ["HUMBUG_API_KEY"] = api_key + humbug_account_email = options.user + "@mit.edu" import humbug humbug_client = humbug.Client( - email=options.user + "@mit.edu", + email=humbug_account_email, api_key=api_key, verbose=True, client="zephyr_mirror",