Default 'append' and 'format' parameters values are added. fixed #22

master
Иванов Денис 3 years ago
parent 2fad797d86
commit 920fc6c819

@ -946,6 +946,7 @@ class TemplateExecutor:
join_before=False, replace=False) -> None:
'''Метод описывающий действия при append = "join", если шаблон -- файл.
Объединяет шаблон с целевым файлом.'''
print("join file")
input_path = template_object.input_path
output_path = template_object.output_path
@ -2449,10 +2450,15 @@ class DirectoryProcessor:
template_package = Package(directory_parameters.package,
chroot_path=self.cl_chroot_path)
if (not template_parameters.append and
not template_parameters.run and
not template_parameters.exec):
template_parameters.set_parameter({'append': 'join'})
if not template_parameters.run and not template_parameters.exec:
if not template_parameters.format:
template_parameters.set_parameter({'format': 'raw'})
if not template_parameters.append:
if template_parameters.format == "raw":
template_parameters.set_parameter(
{'append': 'replace'})
else:
template_parameters.set_parameter({'append': 'join'})
if template_parameters.append != 'skip':
# Выполняем действия, указанные в шаблоне.

@ -1 +1 @@
{% calculate merge = 'test-category/test-package' -%}
{% calculate append = "skip", merge = 'test-category/test-package' -%}

Loading…
Cancel
Save