Add an exception message example

This commit is contained in:
Mikhail f. Shiryaev 2022-01-14 10:05:19 +01:00
parent 52594179e3
commit a63494cb66
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -43,7 +43,10 @@ def get_dead_runners_in_ec2(runners):
)
i += inc
except ClientError as e:
# The list of non-existent instances is in the message
# The list of non-existent instances is in the message:
# The instance IDs 'i-069b1c256c06cf4e3, i-0f26430432b044035,
# i-0faa2ff44edbc147e, i-0eccf2514585045ec, i-0ee4ee53e0daa7d4a,
# i-07928f15acd473bad, i-0eaddda81298f9a85' do not exist
message = e.response["Error"]["Message"]
if message.startswith("The instance IDs '") and message.endswith(
"' do not exist"