Skip to content
Snippets Groups Projects
Commit 08187f5f authored by Kristina Mazur's avatar Kristina Mazur
Browse files

Merge branch 'bugFix2' into 'develop'

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

See merge request !8
parents b57118b8 82fe6f0a
No related branches found
No related tags found
2 merge requests!48Initial open source version,!8unicado_workflow: -bugFix: engines could not copied if the engine already exist -> status: fixed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment