From dea8fcd4d595630b1752605d873d235563d02149 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Wed, 15 May 2019 21:56:12 -0700 Subject: [PATCH] Warn on bogus source names --- inquisitor/cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inquisitor/cli.py b/inquisitor/cli.py index 4660d53..a2d96f6 100644 --- a/inquisitor/cli.py +++ b/inquisitor/cli.py @@ -46,7 +46,14 @@ def update(args): logger.error("dungeon must be a directory") exit(-1) sources = load_all_sources(args.srcdir) - names = args.sources or [s.SOURCE for s in sources] + source_names = [s.SOURCE for s in sources] + if args.sources: + names = args.sources + for name in names: + if name not in source_names: + logger.error("Source not found: {}".format(name)) + else: + names = source_names dungeon = Dungeon(args.dungeon) for itemsource in sources: if itemsource.SOURCE in names: