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 2018/08/13 04:12:52 UTC

[GitHub] mistercrunch commented on a change in pull request #3740: [AIRFLOW-2888] Remove shell=True and bash from task launch

mistercrunch commented on a change in pull request #3740: [AIRFLOW-2888] Remove shell=True and bash from task launch
URL: https://github.com/apache/incubator-airflow/pull/3740#discussion_r209488216
 
 

 ##########
 File path: airflow/task/task_runner/base_task_runner.py
 ##########
 @@ -106,7 +106,7 @@ def _read_task_logs(self, stream):
                           self._task_instance.job_id, self._task_instance.task_id,
                           line.rstrip('\n'))
 
-    def run_command(self, run_with, join_args=False):
+    def run_command(self, run_with=[], join_args=False):
 
 Review comment:
   It's a common python gotcha: never instantiate mutable objects as function default as that default is shared by all function calls.
   
   instead use `None` as default and `run_with = run_with or []` in your function.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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