Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[google compute] raise notfound on images that are not found #441

Closed
wants to merge 1 commit into from

Conversation

erjohnso
Copy link
Member

If a user tried to delete an image by name (string) and the image was not found, the code would fail with a NoneType does not contain name attribute error.

This fixes the case where if an image can't be found by string name, it will raise a ResourceNotFoundError.

/cc @tanpeter - if you think this will work and is good, I can merge it in.

@tanpeter
Copy link

This change seems like a right thing to do and make it more consistent with other methods. My only concern is that the moment users upgrade their libcloud library their code might break due to uncaught exception.

@erjohnso
Copy link
Member Author

Thanks for the feedback @tanpeter. I'd expect that users were already checking for None if the image wasn't found, so I'd expect their fix to adjust to the exception to be pretty low (but still surprising).

When we roll a new release, we can flag this change to warn users in the announce email and release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants