From 1a4f97a874c120855209b2763aac238df34b75fc Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Tue, 13 Nov 2012 18:02:35 -0500 Subject: [PATCH] zephyr_mirror: forward messages in test mode if the site is not the default one (imported from commit 7d504a6d555866f12f1657b522b4e6eb380c64a3) --- bots/zephyr_mirror.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index cf34f0d..b616b81 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -13,6 +13,8 @@ import textwrap import signal import logging +DEFAULT_SITE = "https://humbughq.com" + def to_humbug_username(zephyr_username): if "@" in zephyr_username: (user, realm) = zephyr_username.split("@") @@ -100,7 +102,7 @@ def send_humbug(zeph): message["recipient"] = zeph["recipient"] message['content'] = unwrap_lines(zeph['content']) - if options.test_mode: + if options.test_mode and options.site == DEFAULT_SITE: logger.debug("Message is: %s" % (str(message),)) return {'result': "success"} @@ -597,7 +599,7 @@ if __name__ == "__main__": action='store_true') parser.add_option('--site', dest='site', - default="https://humbughq.com", + default=DEFAULT_SITE, help=optparse.SUPPRESS_HELP, action='store') parser.add_option('--user',