From 1a740176ca43d7cfd2647e6a96385772ee940b91 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Thu, 27 Sep 2012 12:40:55 +0200 Subject: Improve DN usage in ipa-client-install A hotfix pushed in a scope of ticket 3088 forced conversion of DN object (baseDN) in IPA client discovery so that ipa-client-install does not crash when creating an IPA default.conf. Since this is not a preferred way to handle DN objects, improve its usage: - make sure, that baseDN retrieved by client discovery is always a DN object - update ipachangeconf.py code to handle strings better and instead of concatenating objects, make sure they are converted to string first As a side-effect of ipachangeconf changes, default.conf config file generated by ipa-client-install has no longer empty new line at the end of a file. Whole ipachangeconf.py has been modified to be compliant with PEP8. https://fedorahosted.org/freeipa/ticket/3088 --- ipapython/ipautil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipapython') diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index d6e97b89..11433b4b 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -831,7 +831,7 @@ def get_ipa_basedn(conn): % (info, IPA_BASEDN_INFO)) continue root_logger.debug("Naming context '%s' is a valid IPA context" % context) - return context + return DN(context) return None -- cgit