diff --git a/geojson_modelica_translator/modelica/modelica_runner.py b/geojson_modelica_translator/modelica/modelica_runner.py index e6b7fb492..797e54944 100644 --- a/geojson_modelica_translator/modelica/modelica_runner.py +++ b/geojson_modelica_translator/modelica/modelica_runner.py @@ -423,7 +423,7 @@ def cleanup_path(self, path: Path, model_name: str, **kwargs: dict) -> None: # Remove the 'tmp' folder that was created by 5G simulations, # because it will have different permissions than the user running the container (especially in CI) - if (path / 'tmp' / 'temperatureResponseMatrix').is_dir(): + if (path / 'tmp' / 'temperatureResponseMatrix').exists(): logger.debug(f'Removing {path / "tmp" / "temperatureResponseMatrix/"}...') logger.debug((path / 'tmp' / 'temperatureResponseMatrix').stat().st_mode) (path / 'tmp' / 'temperatureResponseMatrix').chmod(0o666)