Skip to content
Snippets Groups Projects

unicado_workflow: -bugFix: engines could not copied if the engine already exist -> status: fixed

Merged Andi requested to merge bugFix2 into develop
1 file
+ 9
9
Compare changes
  • Side-by-side
  • Inline
@@ -411,23 +411,23 @@ def post_operations_of_workflow(paths_and_names, control_settings, parameter_for
+ aircraft_project + '/engineData')
for engine in used_engines:
engine_name = engine.find('./model/value').text
for fileName in files_in_engine_directory:
for file_name in files_in_engine_directory:
# check if fileName a directory
if fileName == engine_name:
if file_name == engine_name:
# if true -> delete engine data from project folder
if os.path.isdir(path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project
+ '/engineData/' + fileName) and \
(fileName not in path_of_working_directory_rce + current_workflow_name
+ '/temporaryResults/engineData/'):
+ '/engineData/' + file_name) and not\
(os.path.isdir(path_of_working_directory_rce + current_workflow_name
+ '/temporaryResults/engineData/' + file_name)):
source = path_of_working_directory_rce + current_workflow_name + '/' + aircraft_project \
+ '/engineData/' + fileName
+ '/engineData/' + file_name
destination = path_of_working_directory_rce + current_workflow_name \
+ '/temporaryResults/engineData/' + fileName
+ '/temporaryResults/engineData/' + file_name
shutil.copytree(source, destination)
print('Engine ' + fileName + ' has been successfully copied to results folder!')
print('Engine ' + file_name + ' has been successfully copied to results folder!')
log_file_list.append(str(datetime.now().strftime('%Y-%m-%d %H:%M:%S')) + ': '
'Engine ' + fileName + ' has been successfully copied to results folder!')
'Engine ' + file_name + ' has been successfully copied to results folder!')
''' copy results of current workflow loop and clean up temporary directory '''
# call clean-up function of workflow to copy final results to workflow results directory
Loading