potiuk commented on code in PR #53390:
URL: https://github.com/apache/airflow/pull/53390#discussion_r2217306640
##########
providers/standard/src/airflow/providers/standard/operators/python.py:
##########
@@ -861,6 +861,15 @@ def _ensure_venv_cache_exists(self, venv_cache_path: Path)
-> Path:
self.log.info("New Python virtual environment created in %s",
venv_path)
return venv_path
+ def _cleanup_python_cache_dir(self, cache_dir_path: Path) -> None:
+ try:
+ shutil.rmtree(cache_dir_path)
+ self.log.info("The directory %s has been deleted.", cache_dir_path)
+ except FileNotFoundError:
+ self.log.info("Fail to delete %s. The directory does not exist.",
cache_dir_path)
+ except PermissionError:
+ self.log.info("Permission denied to delete the directory %s.",
cache_dir_path)
Review Comment:
And this should be warning.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]