upgrade azure-storage-blob to 12.8.0 (#625)

Note, this makes use of the new feature, `ContainerClient.exists()` which models our existing mechanism for doing container existence checking.
This commit is contained in:
bmc-msft
2021-03-03 05:33:23 -05:00
committed by GitHub
parent b30ade7d0c
commit 78d6adf555
3 changed files with 4 additions and 7 deletions

View File

@ -10,7 +10,7 @@ import urllib.parse
from typing import Dict, Optional, Union, cast
from azure.common import AzureHttpError, AzureMissingResourceHttpError
from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError
from azure.core.exceptions import ResourceExistsError
from azure.storage.blob import (
BlobClient,
BlobSasPermissions,
@ -74,11 +74,8 @@ def find_container(
# increased IOP rates, this should be a slight optimization
for account in reversed(accounts):
client = get_blob_service(account).get_container_client(container)
try:
client.get_container_properties()
if client.exists():
return client
except ResourceNotFoundError:
continue
return None