two lines of debugging for each Config() lookup is mad, drop it to one
This commit is contained in:
parent
27d0a13330
commit
976e3124f7
|
@ -427,20 +427,19 @@ class ConfigBase(Borg):
|
||||||
|
|
||||||
def get_item(self, key, profile='default', plugin=None):
|
def get_item(self, key, profile='default', plugin=None):
|
||||||
"""Look up a configuration item"""
|
"""Look up a configuration item"""
|
||||||
dbg('ConfigBase::get_item: %s:%s' % (profile, key))
|
|
||||||
if self.global_config.has_key(key):
|
if self.global_config.has_key(key):
|
||||||
dbg('ConfigBase::get_item: found in globals: %s' %
|
dbg('ConfigBase::get_item: %s found in globals: %s' %
|
||||||
self.global_config[key])
|
(key, self.global_config[key]))
|
||||||
return(self.global_config[key])
|
return(self.global_config[key])
|
||||||
elif self.profiles[profile].has_key(key):
|
elif self.profiles[profile].has_key(key):
|
||||||
dbg('ConfigBase::get_item: found in profile %s (%s)' % (
|
dbg('ConfigBase::get_item: %s found in profile %s: %s' % (
|
||||||
profile, self.profiles[profile][key]))
|
key, profile, self.profiles[profile][key]))
|
||||||
return(self.profiles[profile][key])
|
return(self.profiles[profile][key])
|
||||||
elif key == 'keybindings':
|
elif key == 'keybindings':
|
||||||
return(self.keybindings)
|
return(self.keybindings)
|
||||||
elif plugin is not None and self.plugins[plugin].has_key(key):
|
elif plugin is not None and self.plugins[plugin].has_key(key):
|
||||||
dbg('ConfigBase::get_item: found in plugin %s (%s)' % (
|
dbg('ConfigBase::get_item: %s found in plugin %s: %s' % (
|
||||||
plugin, self.plugins[plugin][key]))
|
key, plugin, self.plugins[plugin][key]))
|
||||||
return(self.plugins[plugin][key])
|
return(self.plugins[plugin][key])
|
||||||
else:
|
else:
|
||||||
raise KeyError('ConfigBase::get_item: unknown key %s' % key)
|
raise KeyError('ConfigBase::get_item: unknown key %s' % key)
|
||||||
|
|
Loading…
Reference in New Issue