diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-06-12 10:00:49 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-06-12 10:00:49 -0400 |
commit | 0e5e54118824d477af758cb2c336a1dad79db407 (patch) | |
tree | d0e6ab709538b4806b472b772b2d90ec91958162 /src | |
parent | ee84ce80cc8992438ca17418a98918aec642aef6 (diff) | |
download | bcfg2-0e5e54118824d477af758cb2c336a1dad79db407.tar.gz bcfg2-0e5e54118824d477af758cb2c336a1dad79db407.tar.bz2 bcfg2-0e5e54118824d477af758cb2c336a1dad79db407.zip |
EntrySet inherits from Debuggable so no longer needs explicity debug_log; properly toggle debug on GroupSpool entries
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugin.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin.py b/src/lib/Bcfg2/Server/Plugin.py index 8a976a048..2c636721c 100644 --- a/src/lib/Bcfg2/Server/Plugin.py +++ b/src/lib/Bcfg2/Server/Plugin.py @@ -988,10 +988,6 @@ class EntrySet(Debuggable): pattern += '(G(?P<prio>\d+)_(?P<group>\S+))))?$' self.specific = re.compile(pattern) - def debug_log(self, message, flag=None): - if (flag is None and self.debug_flag) or flag: - logger.error(message) - def sort_by_specific(self, one, other): return cmp(one.specific, other.specific) @@ -1187,6 +1183,12 @@ class GroupSpool(Plugin, Generator): else: return self.handles[event.requestID][:-1] + def toggle_debug(self): + for entry in self.entries.values(): + if hasattr(entry, "toggle_debug"): + entry.toggle_debug() + return Plugin.toggle_debug() + def HandleEvent(self, event): """Unified FAM event handler for GroupSpool.""" action = event.code2str() |