We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5e3723 commit 491e865Copy full SHA for 491e865
1 file changed
hwcomponents_cacti/hwcomponents_cacti.py
@@ -562,9 +562,16 @@ def read_csv_results(output_path_csv):
562
return read_csv_results(output_path_csv)
563
except Exception as e:
564
self.logger.warning(
565
- f"Error reading CACTI output file {output_path_csv}: {e}"
+ f"Error reading CACTI output file {output_path_csv}: {e}. "
566
+ f"Deleting stale cache and rerunning CACTI."
567
)
- pass
568
+ # CACTI opens its output file in append mode, so a stale
569
+ # cache error in cache would survive the re-run. Remove
570
+ # it first.
571
+ try:
572
+ os.remove(output_path_csv)
573
+ except OSError:
574
+ pass
575
576
with open(input_path, "w") as f:
577
f.write("".join(cfg))
0 commit comments