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 2021/10/06 00:00:43 UTC
[GitHub] [airflow] uranusjr commented on a change in pull request #18723: Remove duplicate line of code for configuration copy
uranusjr commented on a change in pull request #18723:
URL: https://github.com/apache/airflow/pull/18723#discussion_r722790213
##########
File path: airflow/task/task_runner/base_task_runner.py
##########
@@ -61,13 +61,14 @@ def __init__(self, local_task_job):
# Add sudo commands to change user if we need to. Needed to handle SubDagOperator
# case using a SequentialExecutor.
self.log.debug("Planning to run as the %s user", self.run_as_user)
- if self.run_as_user and (self.run_as_user != getuser()):
- # We want to include any environment variables now, as we won't
- # want to have to specify them in the sudo call - they would show
- # up in `ps` that way! And run commands now, as the other user
- # might not be able to run the cmds to get credentials
- cfg_path = tmp_configuration_copy(chmod=0o600)
+ # We want to include any environment variables now, as we won't
+ # want to have to specify them in the sudo call - they would show
+ # up in `ps` that way! And run commands now, as the other user
+ # might not be able to run the cmds to get credentials
+ cfg_path = tmp_configuration_copy(chmod=0o600)
+
+ if self.run_as_user and (self.run_as_user != getuser()):
Review comment:
```suggestion
if self.run_as_user and self.run_as_user != getuser():
```
Parentheses redundant.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org