Skip to content

Commit 6202f74

Browse files
committed
fix linter
1 parent 2633be9 commit 6202f74

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

aws-replicator/aws_replicator/server/aws_request_forwarder.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
from localstack.aws.chain import Handler, HandlerChain
99
from localstack.constants import APPLICATION_JSON, LOCALHOST, LOCALHOST_HOSTNAME
1010
from localstack.http import Response
11-
12-
try:
13-
from localstack.constants import TEST_AWS_ACCOUNT_ID
14-
except ImportError:
15-
# compatibility with localstack 3.5
16-
from localstack.testing.config import TEST_AWS_ACCOUNT_ID
1711
from localstack.utils.aws import arns
1812
from localstack.utils.aws.arns import sqs_queue_arn
1913
from localstack.utils.aws.aws_stack import get_valid_regions
@@ -182,6 +176,12 @@ def _extract_region_from_domain(self, context: RequestContext):
182176
If the request domain name contains a valid region name (e.g., "us-east-2.cognito.localhost.localstack.cloud"),
183177
extract the region and inject an Authorization header with this region into the request.
184178
"""
179+
try:
180+
from localstack.constants import TEST_AWS_ACCESS_KEY_ID
181+
except ImportError:
182+
# compatibility with localstack 3.5
183+
from localstack.testing.config import TEST_AWS_ACCESS_KEY_ID
184+
185185
headers = CaseInsensitiveDict(dict(context.request.headers))
186186
host_header = headers.get("Host") or ""
187187
if LOCALHOST_HOSTNAME not in host_header:

0 commit comments

Comments
 (0)