Fixed circlular import with RDS and CF

This commit is contained in:
Mike Grima 2020-07-04 12:36:14 -07:00
parent c1cffec674
commit 2a950f0da2
2 changed files with 11 additions and 1 deletions

View File

@ -36,3 +36,13 @@ class DBSubnetGroupNotFoundError(RDSClientError):
"DBSubnetGroupNotFound", "DBSubnetGroupNotFound",
"Subnet Group {0} not found.".format(subnet_group_name), "Subnet Group {0} not found.".format(subnet_group_name),
) )
class UnformattedGetAttTemplateException(Exception):
"""Duplicated from CloudFormation to prevent circular deps."""
description = (
"Template error: resource {0} does not support attribute type {1} in Fn::GetAtt"
)
status_code = 400

View File

@ -3,10 +3,10 @@ from __future__ import unicode_literals
import boto.rds import boto.rds
from jinja2 import Template from jinja2 import Template
from moto.cloudformation.exceptions import UnformattedGetAttTemplateException
from moto.core import BaseBackend, BaseModel from moto.core import BaseBackend, BaseModel
from moto.core.utils import get_random_hex from moto.core.utils import get_random_hex
from moto.ec2.models import ec2_backends from moto.ec2.models import ec2_backends
from moto.rds.exceptions import UnformattedGetAttTemplateException
from moto.rds2.models import rds2_backends from moto.rds2.models import rds2_backends