Skip to content
Snippets Groups Projects
Commit ce164a1d authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

fixing casa restore foundation for edge case where cal tar unpacks differently

parent 59596105
No related branches found
No related tags found
1 merge request!587fixing casa restore foundation for edge case where cal tar unpacks differently
Pipeline #3300 passed
......@@ -47,7 +47,14 @@ class RestoreFoundation(FoundationIF):
calibration.extractall("./rawdata")
calibration.close()
src = "./rawdata/products"
copy_tree(src, "./products/")
src2 = "./rawdata/" + cal_name.split(".")[0] + "/products"
if Path(src).exists():
copy_tree(src, "./products/")
elif Path(src2).exists():
copy_tree(src2, "./products")
else:
self.logger.error(f"ERROR: calibration tar file {cal_name} failed to extract correctly!")
else:
self.logger.error(f"ERROR: calibration tar file {cal_name} not found in rawdata!")
# abort since required data not found
......
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