summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-05-10 18:28:40 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-05-10 18:28:40 +0000
commitb9d3c27670b3e6db87d1656d9e5040c27a22e883 (patch)
tree703dd15cb8eceafd15ab81d7e96c0642bc1b51e3 /src
parent6c87661d4dc0f9cbaa09a16d713d1690e23d62c9 (diff)
downloadbcfg2-b9d3c27670b3e6db87d1656d9e5040c27a22e883.tar.gz
bcfg2-b9d3c27670b3e6db87d1656d9e5040c27a22e883.tar.bz2
bcfg2-b9d3c27670b3e6db87d1656d9e5040c27a22e883.zip
Implement a sledge hammer type solution to the odd behavior Ti seems with occasional problems. This may cause a performance hit.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1862 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Cfg.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index e78e3d35b..f0f11b88e 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -157,7 +157,9 @@ class ConfigFileEntry(object):
filedata = ""
# first find basefile
try:
- basefile = [bfile for bfile in self.fragments if bfile.applies(metadata) and not bfile.op][-1]
+ basefiles = [bfile for bfile in self.fragments if bfile.applies(metadata) and not bfile.op]
+ basefiles.sort()
+ basefile = basefiles[-1]
except IndexError:
logger.error("Failed to locate basefile for %s" % name)
raise Bcfg2.Server.Plugin.PluginExecutionError, ('basefile', name)