dabla commented on code in PR #61103:
URL: https://github.com/apache/airflow/pull/61103#discussion_r2738871592


##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/msgraph.py:
##########
@@ -232,8 +245,11 @@ def get_host(self, connection: Connection) -> str:
             if connection.schema and connection.host:
                 return f"{connection.schema}://{connection.host}"
             return NationalClouds.Global.value
-        if not self.host.startswith("http://";) or not 
self.host.startswith("https://";):
-            return f"{connection.schema}://{self.host}"
+
+        if not self.host.startswith(("http://";, "https://";)):

Review Comment:
   There is still code duplication I think? Just calling _ensure_protocol 
should be enough, no need to check if.condition again as this already done in 
the method.



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