summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Server/Plugins/Statistics.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Server/Plugins/Statistics.py b/src/lib/Server/Plugins/Statistics.py
index 2ba7d5648..7c5394a51 100644
--- a/src/lib/Server/Plugins/Statistics.py
+++ b/src/lib/Server/Plugins/Statistics.py
@@ -129,6 +129,8 @@ class Statistics(Bcfg2.Server.Plugin.StatisticsPlugin):
def GetCurrentEntry(self, client, e_type, e_name):
curr = self.FindCurrent(client)
entry = curr.xpath('.//Bad/%s[@name="%s"]' % (e_type, e_name))
+ if not entry:
+ raise Bcfg2.Server.Plugin.PluginExecutionError
cfentry = entry[-1]
owner = cfentry.get('current_owner', cfentry.get('owner'))