commit ff2c06c30538edb9cb47b83f0a194f7893a7f458
Author: Jordan Pittier <email address hidden>
Date: Sun Apr 23 17:42:47 2017 +0200
Make _fix_argv() somewhat compatible with Argparse action='append'
Python Argparse supports the 'append' action [1] which is super handy to allow
a user to repeat several times the same argument, each time with different
values.
This doesn't work with occ that tries to "fix argv" but raises this error:
os_client_config.exceptions.OpenStackConfigException: The following options
were given: '--foo,--foo' which contain duplicates except that one has _
and one has -. There is no sane way for us to know what you're doing.
Remove the duplicate option and try again
This patch tweak the _fix_argv() function so that it doesn't explode
if the duplicate option has no '_' not '-' in its name.
Reviewed: https:/ /review. openstack. org/459115 /git.openstack. org/cgit/ openstack/ os-client- config/ commit/ ?id=ff2c06c3053 8edb9cb47b83f0a 194f7893a7f458
Committed: https:/
Submitter: Jenkins
Branch: master
commit ff2c06c30538edb 9cb47b83f0a194f 7893a7f458
Author: Jordan Pittier <email address hidden>
Date: Sun Apr 23 17:42:47 2017 +0200
Make _fix_argv() somewhat compatible with Argparse action='append'
Python Argparse supports the 'append' action [1] which is super handy to allow
a user to repeat several times the same argument, each time with different
values.
This doesn't work with occ that tries to "fix argv" but raises this error:
os_ client_ config. exceptions. OpenStackConfig Exception: The following options
were given: '--foo,--foo' which contain duplicates except that one has _
and one has -. There is no sane way for us to know what you're doing.
Remove the duplicate option and try again
This patch tweak the _fix_argv() function so that it doesn't explode
if the duplicate option has no '_' not '-' in its name.
Change-Id: I4f06b6aff8d3ab 1df45637399bc3a 9b4b61764a9
Related-bug: #1685630