Skip to content

Commit

Permalink
use exists() instead of is_dir(), just for grins
Browse files Browse the repository at this point in the history
  • Loading branch information
vtnate committed Dec 26, 2023
1 parent ce5126b commit 945be07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geojson_modelica_translator/modelica/modelica_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 945be07

Please sign in to comment.