You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "kannon92 (via GitHub)" <gi...@apache.org> on 2023/07/26 20:01:48 UTC
[GitHub] [airflow] kannon92 commented on a diff in pull request #32719: Reconnect on read_pods when k8s auth fails
kannon92 commented on code in PR #32719:
URL: https://github.com/apache/airflow/pull/32719#discussion_r1275429421
##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -353,7 +354,7 @@ def __init__(
self.volumes = [convert_volume(volume) for volume in volumes] if volumes else []
self.secrets = secrets or []
self.in_cluster = in_cluster
- self.cluster_context = cluster_context
+ self.cluster_context = cluster_context or ""
Review Comment:
I'm a pretty new python dev but I took this as an example throughout the constructor of this function.
```
self.secrets = secrets or []
```
Reading about this here https://realpython.com/python-or-operator/#how-the-python-or-operator-works it seems that it would set self.cluster_context to be cluster_context if it is not None. It is short hand for what you have there.
--
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