From 25a5e38b85f897cc798609217830b626b7880da1 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 1 Jul 2015 18:27:05 +0200 Subject: replication: fix regression in get_agreement_type dcb6916a3b0601e33b08e12aeb25357efed6812b introduced a regression where get_agreement_type does not raise NotFound error if an agreement for host does not exist. The exception was swallowed by get_replication_agreement. Reviewed-By: Tomas Babej --- ipaserver/install/replication.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ipaserver') diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py index 9333f6714..0f420106e 100644 --- a/ipaserver/install/replication.py +++ b/ipaserver/install/replication.py @@ -1169,6 +1169,9 @@ class ReplicationManager(object): def get_agreement_type(self, hostname): entry = self.get_replication_agreement(hostname) + if not entry: + raise errors.NotFound( + "Replication agreement for %s not found" % hostname) objectclass = entry.get("objectclass") for o in objectclass: -- cgit