fakehub: better kw arg handling
This commit is contained in:
parent
a7006a283f
commit
feb0417df5
1 changed files with 6 additions and 4 deletions
|
|
@ -113,10 +113,12 @@ def get_options():
|
|||
for s in args[1:]:
|
||||
if '=' in s:
|
||||
k, v = s.split('=', 1)
|
||||
v = nice_literal(v)
|
||||
kwargs[k] = v
|
||||
else:
|
||||
callargs.append(nice_literal(s))
|
||||
if k.isidentifier():
|
||||
v = nice_literal(v)
|
||||
kwargs[k] = v
|
||||
continue
|
||||
# else
|
||||
callargs.append(nice_literal(s))
|
||||
callargs = koji.encode_args(*callargs, **kwargs)
|
||||
opts.request = koji.xmlrpcplus.dumps(callargs, method, allow_none=1)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue