|
|
|
@ -1145,8 +1145,10 @@ class TemplateExecutor:
|
|
|
|
|
|
|
|
|
|
def _get_input_text(self, template_object: TemplateWrapper,
|
|
|
|
|
replace: bool = False) -> str:
|
|
|
|
|
'''Метод для получения текста входного файла.'''
|
|
|
|
|
# TODO Сделать это как-нибудь получше
|
|
|
|
|
input_path = template_object.input_path
|
|
|
|
|
|
|
|
|
|
if (not replace and (template_object.target_type is not None
|
|
|
|
|
or template_object.parameters.source)):
|
|
|
|
|
# Если целевой файл есть и нет параметра replace --
|
|
|
|
@ -1164,6 +1166,8 @@ class TemplateExecutor:
|
|
|
|
|
return ''
|
|
|
|
|
|
|
|
|
|
def _remove_cfg_files(self, template_object: TemplateWrapper) -> None:
|
|
|
|
|
'''Метод для удаления всех ._cfg-файлов и хэш-сумм добавленных в
|
|
|
|
|
config-файл.'''
|
|
|
|
|
# Убираем все ._cfg файлы.
|
|
|
|
|
if template_object.cfg_list:
|
|
|
|
|
for cfg_file_path in template_object.cfg_list:
|
|
|
|
@ -1174,6 +1178,7 @@ class TemplateExecutor:
|
|
|
|
|
|
|
|
|
|
def _copy_from_source(self, template_object: TemplateWrapper,
|
|
|
|
|
chown=None, chmod=None) -> str:
|
|
|
|
|
'''Метод для копирования файла, указанного в source.'''
|
|
|
|
|
output_path = template_object.output_path
|
|
|
|
|
source_path = template_object.input_path
|
|
|
|
|
|
|
|
|
|