Debian Codegraph @

ansible_collections/amazon/aws/plugins/module_utils/_autoscaling/common.py

raw
1 # -*- coding: utf-8 -*-
2
3 # Copyright: Contributors to the Ansible project
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6 # try:
7 # import botocore
8 # except ImportError:
9 # pass # Modules are responsible for handling this.
10
11 from ..botocore import is_boto3_error_code
12 from ..errors import AWSErrorHandler
13 from ..exceptions import AnsibleAWSError
14
15
16 class AnsibleAutoScalingError(AnsibleAWSError):
17 pass
18
19
20 class AutoScalingErrorHandler(AWSErrorHandler):
21 _CUSTOM_EXCEPTION = AnsibleAutoScalingError
22
23 @classmethod
24 def _is_missing(cls):
25 return is_boto3_error_code("NoSuchEntity")