Skip to content

Commit 5f9a50c

Browse files
Patch for devtools_testutils (Azure#19551)
1 parent 1b6e1d6 commit 5f9a50c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/azure-sdk-tools/devtools_testutils/storage_testcase.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
pass
1515

1616
from azure.mgmt.storage import StorageManagementClient
17-
from azure.mgmt.storage.models import StorageAccount, Endpoints, BlobServiceProperties, DeleteRetentionPolicy, \
18-
LastAccessTimeTrackingPolicy
17+
try:
18+
# Note: these models are only available from v17.0.0 and higher, if you need them you'll also need azure-core 1.4.0 and higher
19+
from azure.mgmt.storage.models import StorageAccount, Endpoints, LastAccessTimeTrackingPolicy, BlobServiceProperties, DeleteRetentionPolicy
20+
except ImportError:
21+
pass
1922

2023
from azure_devtools.scenario_tests.exceptions import AzureTestError
2124

0 commit comments

Comments
 (0)