diff --git a/bcfg2/plugins/DebAutoPkg.py b/bcfg2/plugins/DebAutoPkg.py index 77fd3877..e6e43503 100644 --- a/bcfg2/plugins/DebAutoPkg.py +++ b/bcfg2/plugins/DebAutoPkg.py @@ -11,12 +11,12 @@ __all__ = ["DebAutoPkg"] import Bcfg2.Server.Plugin -class DebAutoPkg(Bcfg2.Server.Plugin.GeneratorPlugin): - __name__ = 'Python' +class DebAutoPkg(Bcfg2.Server.Plugin.Plugin,Bcfg2.Server.Plugin.Generator): + name = 'DebAutoPkg' __version__ = '1.0' __author__ = 'dimino@crans.org' - def HandlesEntry(self, entry): + def HandlesEntry(self, entry, metadata): # Ce plugin fournit une règle pour toute entrée de type # "Package" return entry.tag == 'Package' diff --git a/bcfg2/plugins/Python.py b/bcfg2/plugins/Python.py index 2092bcca..f926b9fb 100644 --- a/bcfg2/plugins/Python.py +++ b/bcfg2/plugins/Python.py @@ -96,9 +96,9 @@ class FakeProperties: def __init__(self): self.properties = lxml.etree.Element("Properties") -class Python(Bcfg2.Server.Plugin.GeneratorPlugin): +class Python(Bcfg2.Server.Plugin.Plugin,Bcfg2.Server.Plugin.Generator): '''The Python generator implements a templating mechanism for configuration files''' - __name__ = 'Python' + name = 'Python' __version__ = '1.0' __author__ = 'dimino@crans.org' @@ -214,7 +214,7 @@ class Python(Bcfg2.Server.Plugin.GeneratorPlugin): '''Surveille un dossier avec FAM''' if path not in self.handles.values(): if not posixpath.isdir(path): - print "Python: Failed to open directory %s" % (name) + print "Python: Failed to open directory %s" % path return reqid = self.core.fam.AddMonitor(path, self) self.handles[reqid] = path