(self, key, value, profile='default', plugin=None)
return(True)
Set a configuration item
Set a configuration item
Set a configuration item
def set_item(self, key, value, profile='default', plugin=None):
        """Set a configuration item"""
        dbg('ConfigBase::set_item: Setting %s=%s (profile=%s, plugin=%s)' %
                (key, value, profile, plugin))

        if key in self.global_config:
            self.global_config[key] = value
        elif key in self.profiles[profile]:
            self.profiles[profile][key] = value
        elif key == 'keybindings':
            self.keybindings = value
        elif plugin is not None:
            if plugin not in self.plugins:
                self.plugins[plugin] = {}
            self.plugins[plugin][key] = value
        else:
            raise KeyError('ConfigBase::set_item: unknown key %s' % key)

        return(True)
def set_item ( self , key , value , profile = 'default' , plugin = None ) : dbg ( 'ConfigBase::set_item: Setting %s=%s (profile=%s, plugin=%s)' % ( key , value , profile , plugin ) ) if key in self . global_config : self . global_config [ key ] = value elif key in self . profiles [ profile ] : self . profiles [ profile ] [ key ] = value elif key == 'keybindings' : self . keybindings = value elif plugin is not None : if plugin not in self . plugins : self . plugins [ plugin ] = { } self . plugins [ plugin ] [ key ] = value else : raise KeyError ( 'ConfigBase::set_item: unknown key %s' % key ) return ( True )