better debug information
This commit is contained in:
parent
e66a462710
commit
1e6c9060b5
1 changed files with 6 additions and 3 deletions
|
@ -166,11 +166,14 @@ class RougailExtra:
|
||||||
try:
|
try:
|
||||||
return self.suboption[key]
|
return self.suboption[key]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise AttributeError
|
raise AttributeError(f'unable to find extra "{key}"')
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return iter(self.suboption.values())
|
return iter(self.suboption.values())
|
||||||
|
|
||||||
|
def items(self):
|
||||||
|
return self.suboption.items()
|
||||||
|
|
||||||
|
|
||||||
class RougailBaseTemplate:
|
class RougailBaseTemplate:
|
||||||
"""Engine to process Creole cheetah template
|
"""Engine to process Creole cheetah template
|
||||||
|
@ -231,7 +234,7 @@ class RougailBaseTemplate:
|
||||||
|
|
||||||
def instance_file(self,
|
def instance_file(self,
|
||||||
filevar: Dict,
|
filevar: Dict,
|
||||||
type: str,
|
type_: str,
|
||||||
service_name: str,
|
service_name: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Run templatisation on one file
|
"""Run templatisation on one file
|
||||||
|
@ -253,7 +256,7 @@ class RougailBaseTemplate:
|
||||||
var = variable[idx]
|
var = variable[idx]
|
||||||
else:
|
else:
|
||||||
var = None
|
var = None
|
||||||
func = f'_instance_{type}'
|
func = f'_instance_{type_}'
|
||||||
data = getattr(self, func)(filevar,
|
data = getattr(self, func)(filevar,
|
||||||
filename,
|
filename,
|
||||||
service_name,
|
service_name,
|
||||||
|
|
Loading…
Reference in a new issue