Skip to content

Commit

Permalink
give myself even more permissions to try to delete tmp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
vtnate committed Dec 22, 2023
1 parent 9839aa0 commit 13f7998
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geojson_modelica_translator/modelica/modelica_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()):
Expand Down

0 comments on commit 13f7998

Please sign in to comment.