From 3829eda6e46a291875d989ecb0afa6a28ed0e3b8 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 25 Mar 2015 20:23:18 +0100 Subject: Server/Plugins/Packages: Fix _init_attributes position. _init_attributes should be called after all properties of the Source class are initialized (so that _init_attributes could overwrite some of it). The Yum class initializes self.deps with a different default entry, that should not be reset by __init__ of Source afterwards. --- src/lib/Bcfg2/Server/Plugins/Packages/Source.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py index 6c5b61742..7aa688f12 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py @@ -212,8 +212,6 @@ class Source(Bcfg2.Server.Plugin.Debuggable): # pylint: disable=R0902 #: compat with older code that relies on this. self.groups = [] - self._init_attributes(xsource) - #: A set of all package names in this source. This will not #: necessarily be populated, particularly by backends that #: reimplement large portions of @@ -232,6 +230,8 @@ class Source(Bcfg2.Server.Plugin.Debuggable): # pylint: disable=R0902 #: :class:`Bcfg2.Server.Plugins.Packages.Collection.Collection` self.provides = dict() + self._init_attributes(xsource) + #: The file (or directory) used for this source's cache data self.cachefile = os.path.join(self.basepath, "cache-%s" % self.cachekey) -- cgit v1.2.3-1-g7c22