summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-14 09:45:12 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-14 09:45:12 -0400
commited48c3c7cd7da8fac30a791ce2495706b6fa3876 (patch)
tree570e9e846c30c6f53bfeff624e4d809e03742fa9 /src/lib/Bcfg2
parentf8f62180e36ccc846315e309b62d17e732a3148f (diff)
downloadbcfg2-ed48c3c7cd7da8fac30a791ce2495706b6fa3876.tar.gz
bcfg2-ed48c3c7cd7da8fac30a791ce2495706b6fa3876.tar.bz2
bcfg2-ed48c3c7cd7da8fac30a791ce2495706b6fa3876.zip
added tests for PrioDir
Diffstat (limited to 'src/lib/Bcfg2')
-rw-r--r--src/lib/Bcfg2/Server/Plugin.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin.py b/src/lib/Bcfg2/Server/Plugin.py
index 424594de8..bb8973aec 100644
--- a/src/lib/Bcfg2/Server/Plugin.py
+++ b/src/lib/Bcfg2/Server/Plugin.py
@@ -958,13 +958,13 @@ class PrioDir(Plugin, Generator, XMLDirectoryBacked):
else:
prio = [int(src.priority) for src in matching]
if prio.count(max(prio)) > 1:
- self.logger.error("Found conflicting sources with "
- "same priority for %s, %s %s" %
- (metadata.hostname,
- entry.tag.lower(), entry.get('name')))
+ msg = "Found conflicting sources with same priority for " + \
+ "%s:%s for %s" % (entry.tag, entry.get("name"),
+ metadata.hostname)
+ self.logger.error(msg)
self.logger.error([item.name for item in matching])
self.logger.error("Priority was %s" % max(prio))
- raise PluginExecutionError
+ raise PluginExecutionError(msg)
index = prio.index(max(prio))
for rname in list(matching[index].cache[1][entry.tag].keys()):