From b263182adabe4a1fff32ed3a1ef765b5e9a68f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Wei=C3=9F?= Date: Wed, 29 Jun 2011 19:12:23 +0200 Subject: New database field: "is_sensitive" The new "entry.reason.is_sensitive" flag indicates whether the file contents/diffs were omitted from the database due to the "sensitive" attribute. --- src/lib/Server/Plugins/DBStats.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/Server/Plugins/DBStats.py') diff --git a/src/lib/Server/Plugins/DBStats.py b/src/lib/Server/Plugins/DBStats.py index 103fb7353..8761d282d 100644 --- a/src/lib/Server/Plugins/DBStats.py +++ b/src/lib/Server/Plugins/DBStats.py @@ -98,8 +98,9 @@ class DBStats(Bcfg2.Server.Plugin.Plugin, ret.append(getattr(entry.reason, t)) else: ret.append(getattr(entry.reason, "current_%s" % t)) - - if entry.reason.current_diff != '': + if entry.reason.is_sensitive: + raise Bcfg2.Server.Plugin.PluginExecutionError + elif entry.reason.current_diff != '': if entry.reason.is_binary: ret.append(binascii.a2b_base64(entry.reason.current_diff)) else: -- cgit v1.2.3-1-g7c22