summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugin.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-06-12 10:00:49 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-06-12 10:00:49 -0400
commit0e5e54118824d477af758cb2c336a1dad79db407 (patch)
treed0e6ab709538b4806b472b772b2d90ec91958162 /src/lib/Bcfg2/Server/Plugin.py
parentee84ce80cc8992438ca17418a98918aec642aef6 (diff)
downloadbcfg2-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/lib/Bcfg2/Server/Plugin.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugin.py10
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()