Fix import errors
For Python 2, the lazy importing style uncovered some importing mistakes. I can't quite figure out how it was working before.
This commit is contained in:
parent
1fc208e52c
commit
9c13798f78
@ -1,4 +1,4 @@
|
||||
import boto
|
||||
import boto.ec2
|
||||
from moto.core import BaseBackend
|
||||
|
||||
|
||||
|
@ -8,7 +8,6 @@ from collections import defaultdict
|
||||
from boto3 import Session
|
||||
from jinja2 import Template
|
||||
from re import compile as re_compile
|
||||
from moto.cloudformation.exceptions import UnformattedGetAttTemplateException
|
||||
from moto.compat import OrderedDict
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.core.utils import get_random_hex
|
||||
@ -308,6 +307,9 @@ class Database(BaseModel):
|
||||
setattr(self, key, value)
|
||||
|
||||
def get_cfn_attribute(self, attribute_name):
|
||||
# Local import to avoid circular dependency with cloudformation.parsing
|
||||
from moto.cloudformation.exceptions import UnformattedGetAttTemplateException
|
||||
|
||||
if attribute_name == "Endpoint.Address":
|
||||
return self.address
|
||||
elif attribute_name == "Endpoint.Port":
|
||||
|
Loading…
Reference in New Issue
Block a user