hussein-awala commented on code in PR #33975:
URL: https://github.com/apache/airflow/pull/33975#discussion_r1313589933


##########
airflow/www/extensions/init_security.py:
##########
@@ -56,14 +56,14 @@ def init_api_experimental_auth(app):
         pass
 
     app.api_auth = []
-    for backend in auth_backends.split(","):
-        try:
+    try:
+        for backend in auth_backends.split(","):
             auth = import_module(backend.strip())
             auth.init_app(app)
             app.api_auth.append(auth)
-        except ImportError as err:
-            log.critical("Cannot import %s for API authentication due to: %s", 
backend, err)
-            raise AirflowException(err)
+    except ImportError as err:
+        log.critical("Cannot import %s for API authentication due to: %s", 
backend, err)
+        raise AirflowException(err)

Review Comment:
   I had the same question because it seems useless. However I prefer to keep 
this PR changing the syntax without any change in the functionality, I will 
open some new PR to improve the raised exceptions.



-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to