def fetch_remote(self, apiurl): from osclib.core import attribute_value_load config = attribute_value_load(apiurl, self.project, 'Config') if config: cp = OscConfigParser.OscConfigParser() config = u'[remote]\n' + config cp.read_string(config) return dict(cp.items('remote')) return None
def read_section(self, section, defaults): """OSC parser is a bit buggy. Re-read the configuration file to find extra sections. """ cp = OscConfigParser.OscConfigParser(defaults=defaults) cp.read(self.conf_file) if cp.has_section(section): return dict(cp.items(section)) else: return defaults