Skip to content
Snippets Groups Projects
Commit aafe5d4b authored by nugget's avatar nugget
Browse files

Fix copy picture to destination bug caused by shutil.move. Switched to...

Fix copy picture to destination bug caused by shutil.move. Switched to shutil.copy2 followed by os.remove.
parent f18dc101
No related branches found
No related tags found
3 merge requests!12v.0.1 for alpha release,!11Draft: Merge version0.1 changes into dev,!10Version0.1
Pipeline #735550 passed
This commit is part of merge request !11. Comments created here will be created in the context of that merge request.
...@@ -92,7 +92,9 @@ def publish(src_datapath, dst_path, figure, plot_name, data_storage): ...@@ -92,7 +92,9 @@ def publish(src_datapath, dst_path, figure, plot_name, data_storage):
# Copy script that calls this function to folder # Copy script that calls this function to folder
shutil.copy2(sys.argv[0], dst_path_invisible) shutil.copy2(sys.argv[0], dst_path_invisible)
# Copy plot file to folder # Copy plot file to folder
shutil.move(plot_path, dst_path_invisible) if os.path.isfile(plot_path):
shutil.copy2(plot_path, dst_path_invisible)
os.remove(plot_path)
case _: case _:
raise ValueError('The data storage method {data_storage} ' raise ValueError('The data storage method {data_storage} '
'is not available.') 'is not available.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment