Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server-del: fix incorrect check for one IPA master #192

Closed
wants to merge 1 commit into from

Conversation

martbab
Copy link
Contributor

@martbab martbab commented Oct 26, 2016

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

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

@MartinBasti MartinBasti self-assigned this Oct 26, 2016
@@ -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]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be there just check if len(ipa_masters) > 1 : or is there any reason why you need to compare list?

@MartinBasti
Copy link
Contributor

LGTM, but I wrote possible improvement inline, please check.

@MartinBasti MartinBasti added ack Pull Request approved, can be merged pushed Pull Request has already been pushed labels Nov 7, 2016
@MartinBasti MartinBasti closed this Nov 7, 2016
@martbab martbab deleted the server-del-fix branch December 16, 2016 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
2 participants