diff --git a/provides.py b/provides.py index eca7d67..d2b2cb1 100644 --- a/provides.py +++ b/provides.py @@ -93,8 +93,12 @@ class ManilaPluginProvides(reactive.RelationBase): def clear_changed(self): """Provide a convenient method to clear the .changed relation""" - conversation = self.conversation() - conversation.remove_state(self.states.changed) + try: + self.remove_state(self.states.changed) + except ValueError: + # work around Juju 1.25.x error where it can't find the scope for + # the interface (randomly) - Bug #1663633 + pass @property def name(self): diff --git a/requires.py b/requires.py index c9fbccb..54637bb 100644 --- a/requires.py +++ b/requires.py @@ -120,8 +120,12 @@ class ManilaPluginRequires(reactive.RelationBase): def clear_changed(self): """Provide a convenient method to clear the .changed relation""" - conversation = self.conversation() - conversation.remove_state(self.states.changed) + try: + self.remove_state(self.states.changed) + except ValueError: + # this works around a Juju 1.25.x bug where it can't find the right + # scoped conversation - Bug #1663633 + pass def set_authentication_data(self, value, name=None): """Set the authentication data to the plugin charm. This is to enable