from wal_e import retries
from wal_e.worker.base import _Deleter


class Deleter(_Deleter):

    def __init__(self, wabs_conn, container):
        super(Deleter, self).__init__()
        self.wabs_conn = wabs_conn
        self.container = container

    @retries.retry()
    def _delete_batch(self, page):
        # Azure Blob Service has no concept of mass-delete, so we must nuke
        # each blob one-by-one...
        for blob in page:
            self.wabs_conn.delete_blob(self.container, blob.name)

@@ -19,16 +19,43 @@
 retries%0A
+from wal_e import log_help%0A
 from wal
@@ -86,16 +86,447 @@
 eleter%0A%0A
+try:%0A    # New class name in the Azure SDK sometime after v1.0.%0A    #%0A    # See%0A    # https://github.com/Azure/azure-sdk-for-python/blob/master/ChangeLog.txt%0A    from azure.common import AzureMissingResourceHttpError%0Aexcept ImportError:%0A    # Backwards compatbility for older Azure drivers.%0A    from azure import WindowsAzureMissingResourceError %5C%0A        as AzureMissingResourceHttpError%0A%0A%0Alogger = log_help.WalELogger(__name__)%0A%0A
 %0Aclass D
@@ -893,16 +893,37 @@
 n page:%0A
+            try:%0A    
         
@@ -980,8 +980,279 @@
 b.name)%0A
+            except AzureMissingResourceHttpError:%0A                logger.warning(%0A                    msg='failed while deleting resource',%0A                    detail='Blob %7B0%7D does not exist in container %7B1%7D.'.format(%0A                        blob.name, self.container))%0A

Fix infinite retry while deleting missing resource in WABS