mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1162851 - Keep the template name in TemplateContext instances. r=gps
This commit is contained in:
parent
4f30f70ed8
commit
6280543bb0
@ -268,6 +268,10 @@ class Context(KeyedDefaultDict):
|
||||
|
||||
|
||||
class TemplateContext(Context):
|
||||
def __init__(self, template=None, allowed_variables={}, config=None):
|
||||
self.template = template
|
||||
super(TemplateContext, self).__init__(allowed_variables, config)
|
||||
|
||||
def _validate(self, key, value):
|
||||
return Context._validate(self, key, value, True)
|
||||
|
||||
|
@ -61,8 +61,8 @@ class GypContext(TemplateContext):
|
||||
"""
|
||||
def __init__(self, config, relobjdir):
|
||||
self._relobjdir = relobjdir
|
||||
TemplateContext.__init__(self, allowed_variables=self.VARIABLES(),
|
||||
config=config)
|
||||
TemplateContext.__init__(self, template='Gyp',
|
||||
allowed_variables=self.VARIABLES(), config=config)
|
||||
|
||||
@classmethod
|
||||
@memoize
|
||||
|
@ -410,8 +410,10 @@ class MozbuildSandbox(Sandbox):
|
||||
func, code, path = template
|
||||
|
||||
def template_function(*args, **kwargs):
|
||||
context = TemplateContext(self._context._allowed_variables,
|
||||
self._context.config)
|
||||
context = TemplateContext(
|
||||
template=func.func_name,
|
||||
allowed_variables=self._context._allowed_variables,
|
||||
config=self._context.config)
|
||||
context.add_source(self._context.current_path)
|
||||
for p in self._context.all_paths:
|
||||
context.add_source(p)
|
||||
|
Loading…
Reference in New Issue
Block a user