def _locatorDecide(self, plugin_info_ext, plugin_locator):
        """
        For backward compatibility, we kept the *plugin_info_ext* argument.
        Thus we may use it if provided. Returns the (possibly modified)
        *plugin_locator*.
        """
        specific_info_ext = plugin_info_ext is not None
        specific_locator = plugin_locator is not None
        if not specific_info_ext and not specific_locator:
            # use the default behavior
            res = PluginFileLocator()
        elif not specific_info_ext and specific_locator:
            # plugin_info_ext not used
            res = plugin_locator
        elif not specific_locator and specific_info_ext:
            # plugin_locator not used, and plugin_info_ext provided
            # -> compatibility mode
            res = PluginFileLocator()
            res.setAnalyzers([PluginFileAnalyzerWithInfoFile("info_ext",plugin_info_ext)])
        elif specific_info_ext and specific_locator:
            # both provided... issue a warning that tells "plugin_info_ext"
            # will be ignored
            msg = ("Two incompatible arguments (%s) provided:",
                   "'plugin_info_ext' and 'plugin_locator'). Ignoring",
                   "'plugin_info_ext'.")
            raise ValueError(" ".join(msg) % self.__class__.__name__)
        return res
dataset/ETHPy150Open datamachine/telex/telex/plugin/PluginManager.py/PluginManager._locatorDecide/original