Nishieee commented on code in PR #67016:
URL: https://github.com/apache/airflow/pull/67016#discussion_r3259252998


##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/wasb.py:
##########
@@ -271,6 +272,21 @@ def check_for_prefix(self, container_name: str, prefix: 
str, **kwargs) -> bool:
         blobs = self.get_blobs_list(container_name=container_name, 
prefix=prefix, **kwargs)
         return bool(blobs)
 
+    def check_for_container(self, container_name: str) -> bool:
+        """
+        Check if a container exists on Azure Blob Storage.
+
+        :param container_name: Name of the container.
+        :return: True if the container exists, False otherwise.
+        """
+        try:
+            container = self._get_container_client(container_name)
+            self.check_for_variable_type("container", container, 
ContainerClient)
+            cast("ContainerClient", container).get_container_properties()

Review Comment:
   Good call - will switch to ContainerClient.exists(). Would you like to 
implement this, or should I go ahead?



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