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/05/18 09:01:16 UTC

[GitHub] [airflow] ashb commented on a change in pull request #15912: Sandbox templates

ashb commented on a change in pull request #15912:
URL: https://github.com/apache/airflow/pull/15912#discussion_r634186053



##########
File path: airflow/models/taskinstance.py
##########
@@ -1837,14 +1837,9 @@ def get_email_subject_content(self, exception):
                     max_tries=self.max_tries,
                 )
             )
-            if self.dag.render_template_as_native_obj:
-                jinja_env = jinja2.nativetypes.NativeEnvironment(
-                    loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), autoescape=True
-                )
-            else:
-                jinja_env = jinja2.Environment(
-                    loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), autoescape=True
-                )
+            jinja_env = jinja2.Environment(
+                loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), autoescape=True
+            )

Review comment:
       This change was made because I was looking for all cases of jinaj2.Environment, and since 3 lines down we render _fixed_ templates, we know it would never product a Native object, so we don't need it.
   
   This change isn't required here, and I can split it out to a separate PR.




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