mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
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:
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user