You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/05/19 20:01:38 UTC

[GitHub] [airflow] bolkedebruin commented on a change in pull request #5304: [AIRFLOW-4541] Deprecate mkdirs utility function for pathlib

bolkedebruin commented on a change in pull request #5304: [AIRFLOW-4541] Deprecate mkdirs utility function for pathlib
URL: https://github.com/apache/airflow/pull/5304#discussion_r285395472
 
 

 ##########
 File path: airflow/utils/log/file_task_handler.py
 ##########
 @@ -194,10 +195,7 @@ def _init_file(self, ti):
         # operator is not compatible with impersonation (e.g. if a Celery executor is used
         # for a SubDag operator and the SubDag operator has a different owner than the
         # parent DAG)
-        if not os.path.exists(directory):
-            # Create the directory as globally writable using custom mkdirs
-            # as os.makedirs doesn't set mode properly.
-            mkdirs(directory, 0o777)
+        pathlib.Path(directory).mkdir(mode=0o777, parents=True, exist_ok=True)
 
 Review comment:
   We should really stop the 777 madness

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services