Skip to content

Commit

Permalink
catch general exception, remove azure.core import (Azure#17908)
Browse files Browse the repository at this point in the history
  • Loading branch information
seankane-msft authored and mccoyp committed Apr 9, 2021
1 parent 7c14f5f commit e00233c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/azure-sdk-tools/devtools_testutils/resource_testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import logging
from functools import partial

from azure.core.exceptions import HttpResponseError

from azure_devtools.scenario_tests import AzureTestError, ReservedResourceNameError

from azure.mgmt.resource import ResourceManagementClient
Expand Down Expand Up @@ -112,9 +110,9 @@ def remove_resource(self, name, **kwargs):
raise AzureTestError("Timed out waiting for resource group to be deleted.")
else:
self.client.resource_groups.begin_delete(name, polling=False)
except HttpResponseError as err:
except Exception as err: # NOTE: some track 1 libraries do not have azure-core installed. Cannot use HttpResponseError here
logging.info("Failed to delete resource group with name {}".format(name))
logging.info("{}".format(err.response))
logging.info("{}".format(err))
pass


Expand Down

0 comments on commit e00233c

Please sign in to comment.