Github user mrdrozdov commented on the pull request:
https://github.com/apache/spark/pull/5172#issuecomment-87768741
Great. I made a slight change to make reduce the verbosity when given a
non-existent AMI. connection.get_image is definitely right call to use here,
but there's a slight bug/inconsistency in boto. get_image is supposed to just
return null if the AMI doesn't exist, but it ends up throwing an
EC2ResponseError which I think was causing the verbosity that @nchammas
noticed. I have a PR out for the boto fix, and in the mean time wrapped
get_image in a try/except block.
I could have just left the code as before, but I think it's nice to remove
the image variable seeing that it's no longer being used, plus get_image is a
bit more explicit than get_all_images. Although, it's n2bd.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]