Catch a few more errors related to wrong/missing launch templates

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2022-11-01 06:44:43 +00:00 committed by Megan Wilhite
parent 45a2df05d8
commit d53f98dd58

View file

@ -485,7 +485,7 @@ class VM:
LaunchTemplateName=LAUNCH_TEMPLATE_NAME_FMT.format(self.config.ami)
)
except ClientError as exc:
if "InvalidLaunchTemplateName.NotFoundException" not in str(exc):
if "InvalidLaunchTemplateName." not in str(exc):
raise
self.ctx.error(f"Could not find a launch template for {self.name!r}")
self.ctx.exit(1)