diff options
author | Martin Basti <mbasti@redhat.com> | 2017-01-18 12:55:13 +0100 |
---|---|---|
committer | David Kupka <dkupka@redhat.com> | 2017-01-31 10:44:42 +0100 |
commit | 38fd8b356d66553d21a3e64374fdc39427a05baf (patch) | |
tree | 61a7dc24135d098be971d4c10b31978039070eee /ipaserver/install | |
parent | a26cf0d7910dd4c0a4da08682b4be8d3d94ba520 (diff) | |
download | freeipa-38fd8b356d66553d21a3e64374fdc39427a05baf.tar.gz freeipa-38fd8b356d66553d21a3e64374fdc39427a05baf.tar.xz freeipa-38fd8b356d66553d21a3e64374fdc39427a05baf.zip |
wait_for_entry: use only DN as parameter
Using the whole entry is not needed as parameter because only DN is used
and it prevents easier usage of this function
https://fedorahosted.org/freeipa/ticket/6588
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaserver/install')
-rw-r--r-- | ipaserver/install/dogtaginstance.py | 2 | ||||
-rw-r--r-- | ipaserver/install/replication.py | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/ipaserver/install/dogtaginstance.py b/ipaserver/install/dogtaginstance.py index 4c02d733b..2ebff6b09 100644 --- a/ipaserver/install/dogtaginstance.py +++ b/ipaserver/install/dogtaginstance.py @@ -459,7 +459,7 @@ class DogtagInstance(service.Service): ldap_uri = ipaldap.get_ldap_uri(self.master_host) master_conn = ipaldap.LDAPClient(ldap_uri) master_conn.gssapi_bind() - replication.wait_for_entry(master_conn, entry) + replication.wait_for_entry(master_conn, entry.dn) del master_conn def __remove_admin_from_group(self, group): diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py index 9ce93fc8b..c4260dd18 100644 --- a/ipaserver/install/replication.py +++ b/ipaserver/install/replication.py @@ -155,7 +155,7 @@ def wait_for_task(conn, dn): return exit_code -def wait_for_entry(connection, entry, timeout=7200, attr='', quiet=True): +def wait_for_entry(connection, dn, timeout=7200, attr='', quiet=True): """Wait for entry and/or attr to show up""" filter = "(objectclass=*)" @@ -165,8 +165,6 @@ def wait_for_entry(connection, entry, timeout=7200, attr='', quiet=True): attrlist.append(attr) timeout += int(time.time()) - dn = entry.dn - if not quiet: sys.stdout.write("Waiting for %s %s:%s " % (connection, dn, attr)) sys.stdout.flush() @@ -733,7 +731,7 @@ class ReplicationManager(object): # that we will have to set the memberof fixup task self.need_memberof_fixup = True - wait_for_entry(a_conn, entry) + wait_for_entry(a_conn, entry.dn) def needs_memberof_fixup(self): return self.need_memberof_fixup |