From 976e3124f7e35a9daf91835618ede7ce920a6116 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sun, 10 Jan 2010 23:47:15 +0000 Subject: [PATCH] two lines of debugging for each Config() lookup is mad, drop it to one --- terminatorlib/config.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 5377f187..036042e5 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -427,20 +427,19 @@ class ConfigBase(Borg): def get_item(self, key, profile='default', plugin=None): """Look up a configuration item""" - dbg('ConfigBase::get_item: %s:%s' % (profile, key)) if self.global_config.has_key(key): - dbg('ConfigBase::get_item: found in globals: %s' % - self.global_config[key]) + dbg('ConfigBase::get_item: %s found in globals: %s' % + (key, self.global_config[key])) return(self.global_config[key]) elif self.profiles[profile].has_key(key): - dbg('ConfigBase::get_item: found in profile %s (%s)' % ( - profile, self.profiles[profile][key])) + dbg('ConfigBase::get_item: %s found in profile %s: %s' % ( + key, profile, self.profiles[profile][key])) return(self.profiles[profile][key]) elif key == 'keybindings': return(self.keybindings) elif plugin is not None and self.plugins[plugin].has_key(key): - dbg('ConfigBase::get_item: found in plugin %s (%s)' % ( - plugin, self.plugins[plugin][key])) + dbg('ConfigBase::get_item: %s found in plugin %s: %s' % ( + key, plugin, self.plugins[plugin][key])) return(self.plugins[plugin][key]) else: raise KeyError('ConfigBase::get_item: unknown key %s' % key)