From: W. Trevor King Date: Thu, 18 Oct 2012 12:43:36 +0000 (-0400) Subject: rss2email: change -c/--config option from nargs to append. X-Git-Tag: v3.0~72^2~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e40d4083f509603a3283251897221f9d294d7719;p=rss2email.git 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). --- 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]