From 325ec470469f8916615a4a8eca4b7bc8e9ba5354 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 12 Oct 2012 17:47:18 -0400 Subject: [PATCH] zephyr_mirror: Improve verbosity defaults. (imported from commit 6754b992a72f4ed844eed3eab2a114bd5c73a713) --- zephyr_mirror.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/zephyr_mirror.py b/zephyr_mirror.py index d088b6b..7ace325 100755 --- a/zephyr_mirror.py +++ b/zephyr_mirror.py @@ -39,6 +39,10 @@ parser.add_option('--forward-from-humbug', dest='forward_from_humbug', default=False, action='store_true') +parser.add_option('--verbose', + dest='verbose', + default=False, + action='store_true') parser.add_option('--no-auto-subscribe', dest='auto_subscribe', default=True, @@ -138,6 +142,7 @@ def maybe_restart_mirroring_script(): if os.stat(root_path + "/restart_stamp").st_mtime > start_time or \ (os.environ["USER"] == "tabbott" and os.stat(root_path + "/tabbott_stamp").st_mtime > start_time): + print print "%s: zephyr mirroring script has been updated; restarting..." % \ (datetime.datetime.now()) os.kill(child_pid, signal.SIGKILL) @@ -353,10 +358,11 @@ def subscribed_to_mail_messages(): def add_humbug_subscriptions(): zephyr_subscriptions = set() - for (cls, instance, recipient) in parse_zephyr_subs(verbose=True): + for (cls, instance, recipient) in parse_zephyr_subs(verbose=options.verbose): if instance != "*" or recipient != "*": - print "Skipping ~/.zephyr.subs line: [%s,%s,%s]: Non-* values" % \ - (cls, instance, recipient) + if options.verbose: + print "Skipping ~/.zephyr.subs line: [%s,%s,%s]: Non-* values" % \ + (cls, instance, recipient) continue zephyr_subscriptions.add(cls) if len(zephyr_subscriptions) != 0: