From d794839e712a361861f1baf7df456c370edd4a99 Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Wed, 31 May 2017 11:52:29 +0100 Subject: [PATCH] Fix requires so that broken,departed removes available The {relation-name}.available state persisted even though the conversation had departed. This led code to think the connection was still valid, try to use it, and then crash. Change-Id: I523fecff4e80734772872a8a6d2507f1e2162ae3 --- requires.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requires.py b/requires.py index 4ec652e..f168a1d 100644 --- a/requires.py +++ b/requires.py @@ -41,8 +41,7 @@ class BindRNDCRequires(RelationBase): def departed_or_broken(self): conv = self.conversation() conv.remove_state('{relation_name}.connected') - if not self.data_complete(): - conv.remove_state('{relation_name}.available') + conv.remove_state('{relation_name}.available') def data_complete(self): """Check if all information for a RNDC connection has been sent