blob: 75ff7a3b79a172e46b160ddda477ba84e7ab45ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import Bcfg2.Server.Plugin
class PackagesConfig(Bcfg2.Server.Plugin.SimpleConfig):
_required = False
def Index(self):
""" Build local data structures """
Bcfg2.Server.Plugin.SimpleConfig.Index(self)
if self.plugin.sources.loaded:
# only reload Packages plugin if sources have been loaded.
# otherwise, this is getting called on server startup, and
# we have to wait until all sources have been indexed
# before we can call Packages.Reload()
self.plugin.Reload()
|