Compare commits

..

4 Commits

3 changed files with 10 additions and 3 deletions

View File

@ -71,6 +71,9 @@ class SpaceAnnotator: # pylint: disable=R0903
get_annotators(ANNOTATORS, 'rougail.annotator')
for extra_annotator in objectspace.rougailconfig['extra_annotators']:
get_annotators(ANNOTATORS, extra_annotator)
for extra_annotator in objectspace.rougailconfig['extra_annotators']:
if extra_annotator not in ANNOTATORS:
get_annotators(ANNOTATORS, extra_annotator)
annotators = ANNOTATORS['rougail.annotator'].copy()
for extra_annotator in objectspace.rougailconfig['extra_annotators']:
annotators.extend(ANNOTATORS[extra_annotator])

View File

@ -32,7 +32,7 @@ from rougail.annotator.target import TargetAnnotator
from rougail.annotator.param import ParamAnnotator
CALC_MULTI = ('calc_value', 'calc_list', 'get_range', 'calc_val_first_value', 'unbound_filename', 'zone_information', 'get_certificates')
CALC_MULTI = ('calc_value', 'calc_list', 'get_range', 'calc_val_first_value', 'unbound_filename', 'zone_information', 'get_certificates', 'nsd_filename', 'get_linked_configuration')
class Annotator(TargetAnnotator, ParamAnnotator):

View File

@ -308,7 +308,10 @@ class RougailBaseTemplate:
async def instance_files(self) -> None:
"""Run templatisation on all files
"""
try:
ori_dir = getcwd()
except FileNotFoundError:
ori_dir = None
chdir(self.templates_dir)
for option in await self.config.option.list(type='all'):
namespace = await option.option.name()
@ -367,6 +370,7 @@ class RougailBaseTemplate:
self.log.debug(_("Instantiation of file '{filename}' disabled"))
self.post_instance_service(service_name, service_type)
self.post_instance()
if ori_dir is not None:
chdir(ori_dir)
async def get_informations(self,