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/03/09 20:47:27 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #14663: Add tests for python & pythonvenv operators execute method.

turbaszek commented on a change in pull request #14663:
URL: https://github.com/apache/airflow/pull/14663#discussion_r590707502



##########
File path: airflow/operators/python.py
##########
@@ -489,7 +489,9 @@ def __init__(  # pylint: disable=too-many-arguments
         self.pickling_library = dill if self.use_dill else pickle
 
     def execute(self, context: Dict):
-        serializable_context = {key: context[key] for key in self._get_serializable_context_keys()}
+        serializable_context = {
+            key: context[key] for key in self._get_serializable_context_keys() if context.get(key) is not None
+        }

Review comment:
       Can you explain this change?




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