From ce5126b35883d8d5d845ec55b6145e17ad023110 Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Tue, 26 Dec 2023 11:19:32 -0700 Subject: [PATCH] ugh, different logging for GHA runner --- geojson_modelica_translator/modelica/modelica_runner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geojson_modelica_translator/modelica/modelica_runner.py b/geojson_modelica_translator/modelica/modelica_runner.py index 193e748c6..e6b7fb492 100644 --- a/geojson_modelica_translator/modelica/modelica_runner.py +++ b/geojson_modelica_translator/modelica/modelica_runner.py @@ -424,10 +424,10 @@ 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(): - print(f'Removing {path / "tmp" / "temperatureResponseMatrix/"}...') - print((path / 'tmp' / 'temperatureResponseMatrix').stat().st_mode) + logger.debug(f'Removing {path / "tmp" / "temperatureResponseMatrix/"}...') + logger.debug((path / 'tmp' / 'temperatureResponseMatrix').stat().st_mode) (path / 'tmp' / 'temperatureResponseMatrix').chmod(0o666) - print((path / 'tmp' / 'temperatureResponseMatrix').stat().st_mode) + logger.debug((path / 'tmp' / 'temperatureResponseMatrix').stat().st_mode) shutil.rmtree(path / 'tmp' / 'temperatureResponseMatrix') # check if the tmp folder is empty now, and if so remove if not any((path / 'tmp').iterdir()):