update pour bcfg2-1.0
darcs-hash:20090603132108-af139-2d6b89763e27934855dde1709c25714119c3e61a.gz
This commit is contained in:
parent
292c933dff
commit
ecb713cc85
2 changed files with 6 additions and 6 deletions
|
@ -11,12 +11,12 @@ __all__ = ["DebAutoPkg"]
|
||||||
|
|
||||||
import Bcfg2.Server.Plugin
|
import Bcfg2.Server.Plugin
|
||||||
|
|
||||||
class DebAutoPkg(Bcfg2.Server.Plugin.GeneratorPlugin):
|
class DebAutoPkg(Bcfg2.Server.Plugin.Plugin,Bcfg2.Server.Plugin.Generator):
|
||||||
__name__ = 'Python'
|
name = 'DebAutoPkg'
|
||||||
__version__ = '1.0'
|
__version__ = '1.0'
|
||||||
__author__ = 'dimino@crans.org'
|
__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
|
# Ce plugin fournit une règle pour toute entrée de type
|
||||||
# "Package"
|
# "Package"
|
||||||
return entry.tag == 'Package'
|
return entry.tag == 'Package'
|
||||||
|
|
|
@ -96,9 +96,9 @@ class FakeProperties:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.properties = lxml.etree.Element("Properties")
|
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'''
|
'''The Python generator implements a templating mechanism for configuration files'''
|
||||||
__name__ = 'Python'
|
name = 'Python'
|
||||||
__version__ = '1.0'
|
__version__ = '1.0'
|
||||||
__author__ = 'dimino@crans.org'
|
__author__ = 'dimino@crans.org'
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ class Python(Bcfg2.Server.Plugin.GeneratorPlugin):
|
||||||
'''Surveille un dossier avec FAM'''
|
'''Surveille un dossier avec FAM'''
|
||||||
if path not in self.handles.values():
|
if path not in self.handles.values():
|
||||||
if not posixpath.isdir(path):
|
if not posixpath.isdir(path):
|
||||||
print "Python: Failed to open directory %s" % (name)
|
print "Python: Failed to open directory %s" % path
|
||||||
return
|
return
|
||||||
reqid = self.core.fam.AddMonitor(path, self)
|
reqid = self.core.fam.AddMonitor(path, self)
|
||||||
self.handles[reqid] = path
|
self.handles[reqid] = path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue