@staticmethod
    def parse_config(plugin_name, path="./settings.conf"):
        """
        Reads and parses every setting defined in the 'settings.conf' within
        the plugin that goes under the name 'plugin_name'.
        """
        ConfParser.plugin_name = plugin_name
        settings = {}
        try:
            confparser = ConfigParser.RawConfigParser()
            confparser.readfp(open(path))
            for section in confparser.sections():
                settings[section] = {}
                for (key,val) in confparser.items(section):
                    # Any Python structure inside a string is to be converted into the desired structure
                    settings[section][key] = ast.literal_eval(val)
                    # Postprocessing: complete content folders with each plugin absolute path (keeps a copy previously)
                    if section == "paths":
                        settings[section][key % "relative__%s"] = settings[section][key]
                        settings[section][key] = ConfParser.parse_path(plugin_name, settings[section][key])
        except Exception as e:
            print "[WARNING] Exception parsing configuration file '%s'. Details: %s" % (str(path), str(e))
        return settings
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/common/utils/plugins/confparser.py/ConfParser.parse_config/swapped operands of `%`