From 9d55822cfbd9ce68a497f982d315a3b21b8225dd Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 14 Aug 2013 11:58:07 -0400 Subject: [PATCH] zephyr_mirror: Add option to control path to streams file. This makes it easy to test the class mirror on just a single test stream. (imported from commit 3decb1ced54507683f1c0634df14f73e693104ef) --- bots/zephyr_mirror_backend.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 34e0bba..726f679 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -213,7 +213,7 @@ def zephyr_bulk_subscribe(subs): def update_subscriptions(): try: - f = file("/home/humbug/public_streams", "r") + f = file(options.stream_file_path, "r") public_streams = simplejson.loads(f.read()) f.close() except: @@ -801,6 +801,10 @@ def parse_args(): parser.add_option('--enable-log', dest='log_path', help=optparse.SUPPRESS_HELP) + parser.add_option('--stream-file-path', + dest='stream_file_path', + default="/home/humbug/public_streams", + help=optparse.SUPPRESS_HELP) parser.add_option('--no-forward-personals', dest='forward_personals', help=optparse.SUPPRESS_HELP,