diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2015-07-01 18:27:05 +0200 |
---|---|---|
committer | Tomas Babej <tbabej@redhat.com> | 2015-07-01 19:44:11 +0200 |
commit | 25a5e38b85f897cc798609217830b626b7880da1 (patch) | |
tree | dcf6742147f751ab3a8cb85e27243e7d0bd30877 | |
parent | e43296ba9acb20342d2b6d4bb030d06deac39c2a (diff) | |
download | freeipa-25a5e38b85f897cc798609217830b626b7880da1.tar.gz freeipa-25a5e38b85f897cc798609217830b626b7880da1.tar.xz freeipa-25a5e38b85f897cc798609217830b626b7880da1.zip |
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 <tbabej@redhat.com>
-rw-r--r-- | ipaserver/install/replication.py | 3 |
1 files changed, 3 insertions, 0 deletions
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: |