summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-09-27 12:40:55 +0200
committerMartin Kosek <mkosek@redhat.com>2012-10-02 13:39:11 +0200
commit1a740176ca43d7cfd2647e6a96385772ee940b91 (patch)
tree5c4d2ec4cb19de7b8de9854ffa5099cf6afe3d2b /ipapython
parent63c7f61501c4b9392f4286e69d43acd620eeb09f (diff)
downloadfreeipa-1a740176ca43d7cfd2647e6a96385772ee940b91.tar.gz
freeipa-1a740176ca43d7cfd2647e6a96385772ee940b91.tar.xz
freeipa-1a740176ca43d7cfd2647e6a96385772ee940b91.zip
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
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/ipautil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py
index d6e97b89b..11433b4be 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