zulip: Use canonical way to require an arg in unsubscribe.
This commit is contained in:
parent
0a49638e82
commit
a06437c4ee
|
@ -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()))
|
||||
|
|
Loading…
Reference in a new issue