Replace --list-id with --list

verbosity ftw
This commit is contained in:
Ivan Habunek 2018-06-12 11:53:10 +02:00
parent c26ccc13f9
commit 10f68fdab7
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
2 changed files with 5 additions and 5 deletions

View File

@ -9,8 +9,8 @@ from toot.utils import assert_domain_exists
def timeline(app, user, args):
# Make sure tag, list and public are not used simultaneously
if len([arg for arg in [args.tag, args.list_id, args.public] if arg]) > 1:
raise ConsoleError("Only one of --public --tag --list-id can be used at one time.")
if len([arg for arg in [args.tag, args.list, args.public] if arg]) > 1:
raise ConsoleError("Only one of --public, --tag, or --list can be used at one time.")
if args.local and not (args.public or args.tag):
raise ConsoleError("The --local option is only valid alongside --public or --tag.")
@ -19,8 +19,8 @@ def timeline(app, user, args):
items = api.timeline_public(app, user, local=args.local)
elif args.tag:
items = api.timeline_tag(app, user, args.tag, local=args.local)
elif args.list_id:
items = api.timeline_list(app, user, args.list_id)
elif args.list:
items = api.timeline_list(app, user, args.list)
else:
items = api.timeline_home(app, user)

View File

@ -142,7 +142,7 @@ READ_COMMANDS = [
"type": str,
"help": "Show timeline for given hashtag.",
}),
(["-i", "--list-id"], {
(["-i", "--list"], {
"type": int,
"help": "Show timeline for given list ID.",
}),