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/06/23 06:41:20 UTC
[GitHub] [airflow] akki commented on issue #5408: [AIRFLOW-4763] Allow list
in DockerOperator.command
akki commented on issue #5408: [AIRFLOW-4763] Allow list in DockerOperator.command
URL: https://github.com/apache/airflow/pull/5408#issuecomment-504724943
@feluelle Ahh, good point - just realised the redundancy. But I also see that the `self.command is not None` part is redundant as well in the newly suggested implemented `self.command is not None and isinstance(self.command, str) and self.command.strip().find('[') == 0`, so I am finally changing this to:
```python
def get_command(self):
if isinstance(self.command, str) and self.command.strip().find('[') == 0:
commands = ast.literal_eval(self.command)
else:
commands = self.command
```
Please have a look and let me know if you see any concerns. Thanks for the review. :)
----------------------------------------------------------------
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