PR#1008: decode_args(): make a copy of the opts dict, rather than modifying it in-place

Merges #1008
https://pagure.io/koji/pull-request/1008

Fixes: #1007
https://pagure.io/koji/issue/1007
decode_args() might result in --package parameter missing in runroot command
This commit is contained in:
Mike McLean 2018-07-27 15:56:44 -04:00
commit e50cd283b8

View file

@ -440,8 +440,8 @@ def decode_args(*args):
if len(args) > 0:
last = args[-1]
if isinstance(last, dict) and last.get('__starstar', False):
del last['__starstar']
opts = last
opts = last.copy()
del opts['__starstar']
args = args[:-1]
return args, opts