From 37028d5abff6ff7f1afda970af49823e37614c78 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 2 Sep 2020 12:28:53 -0700 Subject: [PATCH] zulip-export: Specify --stream argument as required. Signed-off-by: Anders Kaseorg --- tools/zulip-export/zulip-export | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/zulip-export/zulip-export b/tools/zulip-export/zulip-export index f6230144ac..fdec9427ca 100755 --- a/tools/zulip-export/zulip-export +++ b/tools/zulip-export/zulip-export @@ -38,15 +38,11 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '../../api')) import zulip parser = zulip.add_default_arguments(argparse.ArgumentParser(usage=usage)) -parser.add_argument('--stream', default='') +parser.add_argument('--stream', required=True) options = parser.parse_args() client = zulip.init_from_options(options) -if options.stream == "": - print("Usage:", parser.usage, file=sys.stderr) - sys.exit(1) - client.add_subscriptions([{"name": options.stream}]) queue = client.register(event_types=['message']) max_id = queue['max_message_id']