diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2015-03-25 20:23:18 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2015-03-25 20:30:00 +0100 |
commit | 3829eda6e46a291875d989ecb0afa6a28ed0e3b8 (patch) | |
tree | a31a8e59ae9bd2d3822ebeaad5ed67b3cd8e1e4f | |
parent | 72938c5ed7de6e3bb8a286f12e2dc486d83b2f51 (diff) | |
download | bcfg2-3829eda6e46a291875d989ecb0afa6a28ed0e3b8.tar.gz bcfg2-3829eda6e46a291875d989ecb0afa6a28ed0e3b8.tar.bz2 bcfg2-3829eda6e46a291875d989ecb0afa6a28ed0e3b8.zip |
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.
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Packages/Source.py | 4 |
1 files 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) |