zephyr_mirror: Improve verbosity defaults.

(imported from commit 6754b992a72f4ed844eed3eab2a114bd5c73a713)
This commit is contained in:
Tim Abbott 2012-10-12 17:47:18 -04:00
parent d22a77aac6
commit 325ec47046

View file

@ -39,6 +39,10 @@ parser.add_option('--forward-from-humbug',
dest='forward_from_humbug', dest='forward_from_humbug',
default=False, default=False,
action='store_true') action='store_true')
parser.add_option('--verbose',
dest='verbose',
default=False,
action='store_true')
parser.add_option('--no-auto-subscribe', parser.add_option('--no-auto-subscribe',
dest='auto_subscribe', dest='auto_subscribe',
default=True, default=True,
@ -138,6 +142,7 @@ def maybe_restart_mirroring_script():
if os.stat(root_path + "/restart_stamp").st_mtime > start_time or \ if os.stat(root_path + "/restart_stamp").st_mtime > start_time or \
(os.environ["USER"] == "tabbott" and (os.environ["USER"] == "tabbott" and
os.stat(root_path + "/tabbott_stamp").st_mtime > start_time): os.stat(root_path + "/tabbott_stamp").st_mtime > start_time):
print
print "%s: zephyr mirroring script has been updated; restarting..." % \ print "%s: zephyr mirroring script has been updated; restarting..." % \
(datetime.datetime.now()) (datetime.datetime.now())
os.kill(child_pid, signal.SIGKILL) os.kill(child_pid, signal.SIGKILL)
@ -353,8 +358,9 @@ def subscribed_to_mail_messages():
def add_humbug_subscriptions(): def add_humbug_subscriptions():
zephyr_subscriptions = set() 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 != "*": if instance != "*" or recipient != "*":
if options.verbose:
print "Skipping ~/.zephyr.subs line: [%s,%s,%s]: Non-* values" % \ print "Skipping ~/.zephyr.subs line: [%s,%s,%s]: Non-* values" % \
(cls, instance, recipient) (cls, instance, recipient)
continue continue