Allow specifying variable options with the params argument.
This commit is contained in:
parent
4cee825589
commit
60e5077969
|
@ -185,9 +185,12 @@ class Baker(object):
|
||||||
# If the user didn't specify
|
# If the user didn't specify
|
||||||
shortopts = shortopts or {}
|
shortopts = shortopts or {}
|
||||||
|
|
||||||
# Zip up the keyword argument names with their defaults
|
|
||||||
if defaults:
|
if defaults:
|
||||||
|
# Zip up the keyword argument names with their defaults
|
||||||
keywords = dict(zip(arglist[0-len(defaults):], defaults))
|
keywords = dict(zip(arglist[0-len(defaults):], defaults))
|
||||||
|
elif has_kwargs:
|
||||||
|
# allow keyword arguments specified by params
|
||||||
|
keywords = dict(zip(params.keys(), [""]*len(params)))
|
||||||
else:
|
else:
|
||||||
keywords = {}
|
keywords = {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue