Exemplo n.º 1
0
    def __init__(self, stream, renderers, context={}, tmplpath=None, **kwargs):
        SaltYamlSafeLoader.__init__(self, stream, dictclass=OrderedDict)

        self.context = context
        self.tmplpath = tmplpath
        self.renderers = renderers
        self.add_constructor(u'!read', type(self)._yamlet_read)
        self.add_constructor(u'!include', type(self)._yamlet_include)
        self.add_constructor(u'!read_b64encoded', type(self)._yamlet_read_b64)
Exemplo n.º 2
0
    def __init__(self, stream, renderers, context=None, tmplpath=None, **_kwargs):
        SaltYamlSafeLoader.__init__(self, stream, dictclass=OrderedDict)

        if context is None:
            self.context = {}
        else:
            self.context = context

        self.tmplpath = tmplpath
        self.renderers = renderers
        self.add_constructor("!read", type(self)._yamlet_read)
        self.add_constructor("!include", type(self)._yamlet_include)