updated deprecated features
This commit is contained in:
parent
c0a552a1cf
commit
41f35d0502
4 changed files with 8 additions and 7 deletions
|
@ -258,7 +258,7 @@ class BINDFormat(Format):
|
|||
def _add_inet_specline(self, current_parse):
|
||||
'''Метод используемый в парсере директивы inet_spec.'''
|
||||
# Удаляем пробельные символы из второго параметра директивы.
|
||||
current_parse.name.parameter = current_parse.name.parameter.strip()
|
||||
current_parse.name["parameter"] = current_parse.name.parameter.strip()
|
||||
block_name = tuple(current_parse.name.asList())
|
||||
block_content = current_parse.content.asList()
|
||||
content = OrderedDict({'#': []})
|
||||
|
|
|
@ -300,7 +300,7 @@ class LDAPFormat(Format):
|
|||
parsing_result = self._not_unique_parser.parseString(line)
|
||||
self._match = True
|
||||
|
||||
parsing_result.value = parsing_result.value.strip()
|
||||
parsing_result["value"] = parsing_result.value.strip()
|
||||
|
||||
not_unique_name = tuple(parsing_result.asList())
|
||||
parameter_value = ['']
|
||||
|
|
|
@ -7,7 +7,7 @@ from jinja2 import (
|
|||
nodes,
|
||||
Template,
|
||||
Environment,
|
||||
contextfunction,
|
||||
pass_context,
|
||||
FileSystemLoader,
|
||||
TemplateSyntaxError,
|
||||
)
|
||||
|
@ -1609,7 +1609,7 @@ class CalculateExtension(Extension):
|
|||
context.parent['__parameters__'].set_parameter(parameters_dictionary)
|
||||
return ''
|
||||
|
||||
@contextfunction
|
||||
@pass_context
|
||||
def pkg(self, context: CalculateContext, *args: dict) -> Version:
|
||||
'''Метод, реализующий функцию pkg() шаблонов. Функция предназначена для
|
||||
получения версии пакета, к которому уже привязан шаблон, если
|
||||
|
@ -1643,7 +1643,7 @@ class CalculateExtension(Extension):
|
|||
fname.lstrip("/"))
|
||||
return fname
|
||||
|
||||
@contextfunction
|
||||
@pass_context
|
||||
def grep(self, context: CalculateContext, fname: str,
|
||||
regpattern: str) -> str:
|
||||
'''Метод реализующий функцию grep.'''
|
||||
|
@ -1665,7 +1665,7 @@ class CalculateExtension(Extension):
|
|||
else:
|
||||
return ""
|
||||
|
||||
@contextfunction
|
||||
@pass_context
|
||||
def exists(self, context: CalculateContext, fname: str) -> str:
|
||||
'''Метод реализующий функцию exists.'''
|
||||
fname = self.get_full_filepath(fname)
|
||||
|
|
|
@ -3032,7 +3032,8 @@ class DirectoryProcessor:
|
|||
parameters.action,
|
||||
's' if len(self.action) > 1
|
||||
else '',
|
||||
', '.join(self.action),
|
||||
', '.join(self.action) if self.action[0] is not None
|
||||
else "None",
|
||||
template_path))
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue