From e40d4083f509603a3283251897221f9d294d7719 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 18 Oct 2012 08:43:36 -0400 Subject: [PATCH] rss2email: change -c/--config option from nargs to append. Now you should use $ rss2email.py -c path1 -c path2 ... comand Instead of $ rss2email.py -c path1 path2 ... comand The latter made $ rss2email.py -c path1 comand look like a command-less call (`command' being interpreted as another config path). --- rss2email.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rss2email.py b/rss2email.py index e994bb4..82bcb4e 100755 --- a/rss2email.py +++ b/rss2email.py @@ -1542,7 +1542,7 @@ if __name__ == '__main__': parser = argparse.ArgumentParser(description=__doc__, version=__version__) parser.add_argument( - '-c', '--config', metavar='PATH', nargs='*', + '-c', '--config', metavar='PATH', default=[], action='append', help='path to the configuration file') parser.add_argument( '-d', '--data', metavar='PATH', @@ -1640,6 +1640,8 @@ if __name__ == '__main__': LOG.setLevel(max(_logging.DEBUG, _logging.ERROR - 10 * args.verbose)) try: + if not args.config: + args.config = None feeds = Feeds(datafile=args.data, configfiles=args.config) if args.func != cmd_new: lock = args.func not in [cmd_list, cmd_opmlexport] -- 2.26.2