URL: https://github.com/freeipa/freeipa/pull/192
Author: martbab
 Title: #192: server-del: fix incorrect check for one IPA master
Action: opened

PR body:
"""
make the check more robust against returned container types for multivalued
attributes (lists vs. tuples).

https://fedorahosted.org/freeipa/ticket/6417
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/192/head:pr192
git checkout pr192
From 52b8dec120a341100b5401f06c8452e22716697e Mon Sep 17 00:00:00 2001
From: Martin Babinsky <mbabi...@redhat.com>
Date: Wed, 26 Oct 2016 16:07:21 +0200
Subject: [PATCH] server-del: fix incorrect check for one IPA master

make the check more robust against returned container types for multivalued
attributes (lists vs. tuples).

https://fedorahosted.org/freeipa/ticket/6417
---
 ipaserver/plugins/server.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaserver/plugins/server.py b/ipaserver/plugins/server.py
index ec71dbc..a739ee8 100644
--- a/ipaserver/plugins/server.py
+++ b/ipaserver/plugins/server.py
@@ -473,7 +473,7 @@ def handler(msg, ignore_last_of_role):
         ipa_masters = ipa_config['ipa_master_server']
 
         # skip these checks if the last master is being removed
-        if ipa_masters == [hostname]:
+        if list(ipa_masters) == [hostname]:
             return
 
         if self.api.Command.dns_is_enabled()['result']:
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to