From b4ca5c57d230c80ecc4f8eaaa01d8e7a36bcb3b4 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Tue, 17 Mar 2015 16:53:44 +0100 Subject: [PATCH] Server Upgrade: remove unused code in upgrade https://fedorahosted.org/freeipa/ticket/4904 Reviewed-By: David Kupka --- ipaserver/install/ipa_ldap_updater.py | 2 -- ipaserver/install/ldapupdate.py | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ipaserver/install/ipa_ldap_updater.py b/ipaserver/install/ipa_ldap_updater.py index 95688c591..473af961b 100644 --- a/ipaserver/install/ipa_ldap_updater.py +++ b/ipaserver/install/ipa_ldap_updater.py @@ -119,12 +119,10 @@ class LDAPUpdater_Upgrade(LDAPUpdater): super(LDAPUpdater_Upgrade, self).run() options = self.options - updates = None realm = krbV.default_context().default_realm upgrade = IPAUpgrade(realm, self.files, schema_files=options.schema_files) upgrade.create_instance() - upgradefailed = upgrade.upgradefailed if upgrade.badsyntax: raise admintool.ScriptError( diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index 077de3bd6..d3e3c3c32 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -185,16 +185,11 @@ class LDAPUpdate: fqdn = installutils.get_fqdn() if fqdn is None: raise RuntimeError("Unable to determine hostname") - fqhn = fqdn # Save this for the sub_dict variable - if self.ldapi: - fqdn = "ldapi://%%2fvar%%2frun%%2fslapd-%s.socket" % "-".join( - self.realm.split(".") - ) if not self.sub_dict.get("REALM") and self.realm is not None: self.sub_dict["REALM"] = self.realm if not self.sub_dict.get("FQDN"): - self.sub_dict["FQDN"] = fqhn + self.sub_dict["FQDN"] = fqdn if not self.sub_dict.get("DOMAIN"): self.sub_dict["DOMAIN"] = domain if not self.sub_dict.get("SUFFIX") and suffix is not None: @@ -279,7 +274,6 @@ class LDAPUpdate: for each DN in the file.""" update = {} logical_line = "" - action = "" dn = None lcount = 0