FIX - Recreate folder if sphinx-rep already existed.
A fix for an error that happened regularly lately on production calibration requests. i.e.
Waiting on jobs to finish: ['8955633']
Convert svg to pdf and png
Prepare timing summary
Traceback (most recent call last):
File "/home/xcal/deployments/pycalibration-270821/temp/slurm_out_JUNGFRAU_CORRECT_t210919_084629/finalize.py", line 5, in <module>
finalize(joblist=['8955633'],
File "/home/xcal/deployments/pycalibration-270821/src/xfel_calibrate/finalize.py", line 430, in finalize
sphinx_path = combine_report(run_path, calibration)
File "/home/xcal/deployments/pycalibration-270821/src/xfel_calibrate/finalize.py", line 43, in combine_report
makedirs(sphinx_path)
File "/home/xcal/.pyenv/versions/3.8.11/lib/python3.8/os.py", line 223, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/xcal/deployments/pycalibration-270821/temp/slurm_out_JUNGFRAU_CORRECT_t210919_084629/sphinx_rep'
Description
How Has This Been Tested?
Running an epix correction and cancelling the finalize job after creating the sphinx-rep
folder, then rerunning finalize.py
again.
Relevant Documents (optional)
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
Reviewers
Edited by Karim Ahmed