ClusterLabs/pcs

possible copy paste error

Closed this issue · 1 comments

eslerm commented

In pcs/cli/common/parse_args.py's InputModifiers.get() the wrong option might be being returned.

Should:

        if option in self._defined_options:
            return self._options[option]

Be:

        if option in self._defined_options:
            return self._defined_options[option]

Thanks for reporting this. However, there is no issue in the code you are mentioning. self._defined_options is set of strings where all options specified by user are stored. In self._options all options (including specified by user and global defaults) and their values are stored. Therefore if the option was specified by the user, its value is returned, otherwise default value is returned (this is handled below the code you are referring to).