Allow more then one -R be effective

This commit is contained in:
ZyX 2014-02-16 19:17:06 +04:00
parent 3aec68449f
commit 0d49c06846
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def get_argparser(parser=None, *args, **kwargs):
p.add_argument('-c', '--config', metavar='KEY.KEY=VALUE', action='append') p.add_argument('-c', '--config', metavar='KEY.KEY=VALUE', action='append')
p.add_argument('-t', '--theme_option', metavar='THEME.KEY.KEY=VALUE', action='append') p.add_argument('-t', '--theme_option', metavar='THEME.KEY.KEY=VALUE', action='append')
p.add_argument('-p', '--config_path', metavar='PATH') p.add_argument('-p', '--config_path', metavar='PATH')
p.add_argument('-R', '--renderer_arg', metavar='KEY="VAL"', type=lambda a: dict((parsedotval(a),))) p.add_argument('-R', '--renderer_arg', metavar='KEY="VAL"', action='append')
return p return p
@ -65,3 +65,5 @@ def finish_args(args):
args.theme_option = mergeargs((parsedotval(v) for v in args.theme_option)) args.theme_option = mergeargs((parsedotval(v) for v in args.theme_option))
else: else:
args.theme_option = {} args.theme_option = {}
if args.renderer_arg:
args.renderer_arg = mergeargs((parsedotval(v) for v in args.renderer_arg))