summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/DBStats.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/DBStats.py b/src/lib/Server/Plugins/DBStats.py
index abe8f17f7..f3e4fe652 100644
--- a/src/lib/Server/Plugins/DBStats.py
+++ b/src/lib/Server/Plugins/DBStats.py
@@ -30,8 +30,11 @@ class DBStats(Bcfg2.Server.Plugin.StatisticsPlugin):
def GetCurrentEntry(self, client, e_type, e_name):
c_inst = Client.objects.filter(name=client)[0]
- entry = c_inst.current_interaction.bad_items.filter(kind=e_type,
- name=e_name)[0]
+ result = c_inst.current_interaction.bad_items.filter(kind=e_type,
+ name=e_name)
+ if not result:
+ raise Bcfg2.Server.Plugin.PluginExecutionError
+ entry = result[0]
ret = []
data = ('owner', 'group', 'perms')
for t in data: