def __init__(self, message: str, name: str) -> None: """Initializes the CFUError with provided message. Args: message (str): The error message. name (str): The name of the module that generated the error. """ super().__init__(message) self.message = message self.name = name logging_utils.SetUpLogger(self.name) logger = logging_utils.GetLogger(self.name) logger.error(self.message)
from typing import TYPE_CHECKING, List # pylint: disable=import-error from azure.mgmt import resource from msrestazure import azure_exceptions # pylint: enable=import-error from libcloudforensics import logging_utils if TYPE_CHECKING: # TYPE_CHECKING is always False at runtime, therefore it is safe to ignore # the following cyclic import, as it it only used for type hints from libcloudforensics.providers.azure.internal import account # pylint: disable=cyclic-import logging_utils.SetUpLogger(__name__) logger = logging_utils.GetLogger(__name__) class AZResource: """Azure resource functionality. Attributes: az_account (AZAccount): An Azure account object. resource_client (ResourceManagementClient): An Azure resource client object. subscription_client (SubscriptionClient): An Azure subscription client object. """ def __init__(self, az_account: 'account.AZAccount') -> None: