From 13f79985c7ee7c6446c1d0ba2afb66e82fba53ef Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Fri, 22 Dec 2023 14:45:47 -0700 Subject: [PATCH] give myself even more permissions to try to delete tmp dir --- geojson_modelica_translator/modelica/modelica_runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geojson_modelica_translator/modelica/modelica_runner.py b/geojson_modelica_translator/modelica/modelica_runner.py index bc0d0ef1b..fe22a153c 100644 --- a/geojson_modelica_translator/modelica/modelica_runner.py +++ b/geojson_modelica_translator/modelica/modelica_runner.py @@ -422,10 +422,10 @@ def cleanup_path(self, path: Path, model_name: str, **kwargs: dict) -> None: for f in path.glob(pattern): # type: ignore Path(f).unlink(missing_ok=True) - # remove the 'tmp' folder that was created, because it will + # remove the 'tmp' folder that was created by 5G simulations, because it will # have different permissions than the user running the container if (path / 'tmp' / 'temperatureResponseMatrix').exists(): - (path / 'tmp').chmod(0o666) + (path / 'tmp').chmod(0o777) shutil.rmtree(path / 'tmp' / 'temperatureResponseMatrix') # check if the tmp folder is empty now, and if so remove if not any((path / 'tmp').iterdir()):