From a06437c4ee32a5f73d7882d7ed5e86f33480a39f Mon Sep 17 00:00:00 2001 From: derAnfaenger Date: Fri, 15 Sep 2017 13:24:28 +0200 Subject: [PATCH] zulip: Use canonical way to require an arg in unsubscribe. --- zulip/zulip/examples/unsubscribe | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/zulip/zulip/examples/unsubscribe b/zulip/zulip/examples/unsubscribe index 3019578..624a967 100755 --- a/zulip/zulip/examples/unsubscribe +++ b/zulip/zulip/examples/unsubscribe @@ -38,13 +38,9 @@ Specify your Zulip API credentials and server in a ~/.zuliprc file or using the import zulip parser = zulip.add_default_arguments(argparse.ArgumentParser(usage=usage)) -parser.add_argument('--streams', default='') +parser.add_argument('--streams', action='store', required=True) options = parser.parse_args() client = zulip.init_from_options(options) -if options.streams == "": - print("Usage:", parser.usage, file=sys.stderr) - sys.exit(1) - print(client.remove_subscriptions(options.streams.split()))