dstandish commented on code in PR #28878:
URL: https://github.com/apache/airflow/pull/28878#discussion_r1067776939
##########
airflow/providers/elasticsearch/log/es_task_handler.py:
##########
@@ -407,3 +407,18 @@ def get_external_log_url(self, task_instance:
TaskInstance, try_number: int) ->
def supports_external_link(self) -> bool:
"""Whether we can support external links"""
return bool(self.frontend)
+
+
+def safe_attrgetter(*items, obj, default):
+ """
+ Get items from obj but return default if not found
+
+ :meta private:
+ """
+ val = None
+ try:
+ val = attrgetter(*items)(obj)
+ except AttributeError:
+ pass
+
+ return val or default
Review Comment:
yup! lmkyt
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]