Closed lucabello closed 1 year ago
An event guard probably makes more sense!
I was slow on the uptake for the review, but please don't directly check JUJU_HOOK_NAME
. This isn't a promise Juju gives us, and even OF doesn't try to be that clever. catching ModelError
is much less brittle
Issue
This PR addresses #388.
Solution
Moving things depending on
self.external_url
outside of the constructor, so they are not called on removing the application.Release Notes
I moved the logic depending on
self.external_url
to a separate function and invoked that in_configure()
instead of__init__()
.This way, that code is executed in every part of the lifecycle except the removal.