dstandish commented on code in PR #28878:
URL: https://github.com/apache/airflow/pull/28878#discussion_r1067792774


##########
airflow/providers/elasticsearch/log/es_task_handler.py:
##########
@@ -409,16 +409,22 @@ def supports_external_link(self) -> bool:
         return bool(self.frontend)
 
 
-def safe_attrgetter(*items, obj, default):
+def getattr_nested(obj, item, default):
     """
-    Get items from obj but return default if not found
+    Get item from obj but return default if not found
+
+    E.g. calling ``getattr_nested('b.c', a, "NA")`` will return
+    ``a.b.c`` if such a value exists
 
     :meta private:
     """
-    val = None
+    NOTSET = object()
+    val = NOTSET
     try:
-        val = attrgetter(*items)(obj)
+        val = attrgetter(item)(obj)
     except AttributeError:
         pass

Review Comment:
   yes, now that we're  no longer being as "helpful" thanks... updated



-- 
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]

Reply via email to