Ejemplo n.º 1
0
 def __init__(self, fname, spec, encoding):
     CfgGenerator.__init__(self, fname, spec, encoding)
     if not have_genshi:
         msg = "Cfg: Genshi is not available: %s" % fname
         logger.error(msg)
         raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
     self.loader = self.__loader_cls__()
     self.template = None
Ejemplo n.º 2
0
 def __init__(self, fname, spec, encoding):
     CfgGenerator.__init__(self, fname, spec, encoding)
     if not have_genshi:
         msg = "Cfg: Genshi is not available: %s" % fname
         logger.error(msg)
         raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
     self.loader = self.__loader_cls__()
     self.template = None
Ejemplo n.º 3
0
 def __init__(self, fname, spec):
     CfgGenerator.__init__(self, fname, spec)
     if not HAS_JINJA2:
         raise PluginExecutionError("Jinja2 is not available")
     self.template = None
     encoding = Bcfg2.Options.setup.encoding
     self.loader = self.__loader_cls__('/',
                                       encoding=encoding)
     self.environment = self.__environment_cls__(loader=self.loader)
Ejemplo n.º 4
0
 def __init__(self, fname, spec):
     CfgGenerator.__init__(self, fname, spec)
     if not HAS_JINJA2:
         raise PluginExecutionError("Jinja2 is not available")
     self.template = None
     encoding = Bcfg2.Options.setup.encoding
     self.loader = self.__loader_cls__("/", encoding=encoding)
     try:
         # keep_trailing_newline is new in Jinja2 2.7, and will
         # fail with earlier versions
         self.environment = self.__environment_cls__(loader=self.loader, keep_trailing_newline=True)
     except TypeError:
         self.environment = self.__environment_cls__(loader=self.loader)
Ejemplo n.º 5
0
 def __init__(self, fname, spec):
     CfgGenerator.__init__(self, fname, spec)
     if not HAS_JINJA2:
         raise PluginExecutionError("Jinja2 is not available")
     self.template = None
     encoding = Bcfg2.Options.setup.encoding
     self.loader = self.__loader_cls__('/', encoding=encoding)
     try:
         # keep_trailing_newline is new in Jinja2 2.7, and will
         # fail with earlier versions
         self.environment = \
             self.__environment_cls__(loader=self.loader,
                                      keep_trailing_newline=True)
     except TypeError:
         self.environment = \
             self.__environment_cls__(loader=self.loader)
Ejemplo n.º 6
0
 def __init__(self, fname, spec, encoding):
     CfgGenerator.__init__(self, fname, spec, encoding)
     if not HAS_GENSHI:
         raise PluginExecutionError("Genshi is not available")
     self.template = None
     self.loader = self.__loader_cls__(max_cache_size=0)
Ejemplo n.º 7
0
 def __init__(self, fname, spec, encoding):
     CfgGenerator.__init__(self, fname, spec, encoding)
     if not have_cheetah:
         msg = "Cfg: Cheetah is not available: %s" % entry.get("name")
         logger.error(msg)
         raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
Ejemplo n.º 8
0
 def __init__(self, fname):
     CfgGenerator.__init__(self, fname, None)
     StructFile.__init__(self, fname)
     self.cache = dict()
     self.core = get_cfg().core
Ejemplo n.º 9
0
 def __init__(self, fname, spec, encoding):
     CfgGenerator.__init__(self, fname, spec, encoding)
     if not HAS_CRYPTO:
         raise PluginExecutionError("M2Crypto is not available")
Ejemplo n.º 10
0
 def __init__(self, fname, spec):
     CfgGenerator.__init__(self, fname, spec)
     self.template = None
     self.loader = self.__loader_cls__(max_cache_size=0)
Ejemplo n.º 11
0
 def __init__(self, fname, spec, encoding):
     CfgGenerator.__init__(self, fname, spec, encoding)
     if not HAS_CRYPTO:
         msg = "Cfg: M2Crypto is not available"
         LOGGER.error(msg)
         raise PluginExecutionError(msg)
Ejemplo n.º 12
0
 def __init__(self, fname, spec):
     CfgGenerator.__init__(self, fname, spec)
     if not HAS_CHEETAH:
         raise PluginExecutionError("Cheetah is not available")
Ejemplo n.º 13
0
 def __init__(self, fname, spec):
     CfgGenerator.__init__(self, fname, spec)
     if not HAS_JINJA2:
         raise PluginExecutionError("Jinja2 is not available")
Ejemplo n.º 14
0
 def __init__(self, fname, spec, encoding):
     CfgGenerator.__init__(self, fname, spec, encoding)
     if not HAS_CHEETAH:
         msg = "Cfg: Cheetah is not available: %s" % self.name
         LOGGER.error(msg)
         raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
Ejemplo n.º 15
0
 def __init__(self, fname, spec):
     CfgGenerator.__init__(self, fname, spec)
     if not HAS_CHEETAH:
         raise PluginExecutionError("Cheetah is not available")
Ejemplo n.º 16
0
 def __init__(self, fname, spec):
     CfgGenerator.__init__(self, fname, spec)
     if not HAS_CRYPTO:
         raise PluginExecutionError("M2Crypto is not available")