summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-06-09 18:24:28 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-06-09 18:24:28 +0000
commit85fc8b8a7c51daa81a7602f9fee5a96b11b7a6a6 (patch)
tree5d1218b8833f703bd2e6032e5b6629b2a92b74b0 /src
parent34b24211eb8baddec7daf6fa7ecb151fd9aa82e3 (diff)
downloadbcfg2-85fc8b8a7c51daa81a7602f9fee5a96b11b7a6a6.tar.gz
bcfg2-85fc8b8a7c51daa81a7602f9fee5a96b11b7a6a6.tar.bz2
bcfg2-85fc8b8a7c51daa81a7602f9fee5a96b11b7a6a6.zip
Fix error message in non-matching case
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4685 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Cfg.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index 9e078e94f..80c9d7467 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -61,8 +61,10 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet):
matching = [ent for ent in self.entries.values() if \
ent.specific.matches(metadata)]
matching.sort(self.sort_by_specific)
- base = min([matching.index(ent) for ent in matching
- if not ent.specific.delta])
+ non_delta = [matching.index(m) for m in matching if not m.specific.delta]
+ if not non_delta:
+ raise Bcfg2.Server.Plugin.PluginExecutionError
+ base = min(non_delta)
used = matching[:base+1]
used.reverse()
return used