Comment 2 for bug 1685630

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to os-client-config (master)

Reviewed: https://review.openstack.org/459115
Committed: https://git.openstack.org/cgit/openstack/os-client-config/commit/?id=ff2c06c30538edb9cb47b83f0a194f7893a7f458
Submitter: Jenkins
Branch: master

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.

    Change-Id: I4f06b6aff8d3ab1df45637399bc3a9b4b61764a9
    Related-bug: #1685630