From 8defb4a87bda4112036a71e1a4c809fe410090ea Mon Sep 17 00:00:00 2001 From: Jiashuo Li Date: Wed, 11 Mar 2020 11:43:42 +0800 Subject: [PATCH] Delay importing ErrorResponseException --- src/azure-cli/azure/cli/command_modules/cdn/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/cdn/commands.py b/src/azure-cli/azure/cli/command_modules/cdn/commands.py index 33650c0f654..a31c2f49a4c 100644 --- a/src/azure-cli/azure/cli/command_modules/cdn/commands.py +++ b/src/azure-cli/azure/cli/command_modules/cdn/commands.py @@ -5,7 +5,6 @@ from knack.util import CLIError -from azure.mgmt.cdn.models import ErrorResponseException from azure.cli.core.commands import CliCommandType from ._client_factory import (cf_cdn, cf_custom_domain, cf_endpoints, cf_profiles, cf_origins, cf_resource_usage, @@ -14,6 +13,7 @@ def _not_found(message): def _inner_not_found(ex): + from azure.mgmt.cdn.models import ErrorResponseException if isinstance(ex, ErrorResponseException) \ and ex.response is not None \ and ex.response.status_code == 404: