From b9d3c27670b3e6db87d1656d9e5040c27a22e883 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Wed, 10 May 2006 18:28:40 +0000 Subject: 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 --- src/lib/Server/Plugins/Cfg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3-1-g7c22