mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 877265 - Make dmcli parseable by python 2.6;r=ahal
This commit is contained in:
parent
d9378584d2
commit
41e7f67569
@ -168,7 +168,14 @@ class DMCli(object):
|
||||
subparser = subparsers.add_parser(commandname, help=commandprops['help'])
|
||||
if commandprops.get('args'):
|
||||
for arg in commandprops['args']:
|
||||
kwargs = { k: v for k,v in arg.items() if k is not 'name' }
|
||||
# this is more elegant but doesn't work in python 2.6
|
||||
# (which we still use on tbpl @ mozilla where we install
|
||||
# this package)
|
||||
# kwargs = { k: v for k,v in arg.items() if k is not 'name' }
|
||||
kwargs = {}
|
||||
for (k, v) in arg.items():
|
||||
if k is not 'name':
|
||||
kwargs[k] = v
|
||||
subparser.add_argument(arg['name'], **kwargs)
|
||||
subparser.set_defaults(func=commandprops['function'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user