Skip to content

Commit d6529fd

Browse files
committed
requested changes
1 parent 730e04c commit d6529fd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

localstack-core/localstack/testing/scenario/provisioning.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"Delay": 6,
2929
"MaxAttempts": 600,
3030
} # total timeout ~1 hour (6 * 600 = 3_600 seconds)
31-
WAITER_CONFIG_LS = {"Delay": 1, "MaxAttempts": 600} # total timeout ~10 minutes
31+
# total timeout ~10 minutes
32+
WAITER_CONFIG_LS = {"Delay": 1, "MaxAttempts": 600}
3233
CFN_MAX_TEMPLATE_SIZE = 51_200
3334

3435

@@ -320,7 +321,8 @@ def add_cdk_stack(
320321
with open(template_path, "wt") as fd:
321322
template_json = cdk.assertions.Template.from_stack(cdk_stack).to_json()
322323
json.dump(template_json, fd, indent=2)
323-
fd.write("\n") # add trailing newline for linter and Git compliance
324+
# add trailing newline for linter and Git compliance
325+
fd.write("\n")
324326

325327
self.cloudformation_stacks[cdk_stack.stack_name] = {
326328
"StackName": cdk_stack.stack_name,
@@ -405,8 +407,8 @@ def _create_bucket_if_not_exists(self, template_bucket_name: str):
405407
try:
406408
self.aws_client.s3.head_bucket(Bucket=template_bucket_name)
407409
except ClientError as exc:
408-
if exc.response["Error"]["Message"] != "Not Found":
409-
raise exc
410+
if exc.response["Error"]["Code"] != "404":
411+
raise
410412
create_s3_bucket(template_bucket_name, s3_client=self.aws_client.s3)
411413

412414
def _synth(self):

0 commit comments

Comments
 (0)