diff options
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/install/ipa_restore.py | 2 | ||||
-rw-r--r-- | ipaserver/install/plugins/update_managed_permissions.py | 4 | ||||
-rw-r--r-- | ipaserver/install/plugins/update_referint.py | 2 | ||||
-rw-r--r-- | ipaserver/install/schemaupdate.py | 2 | ||||
-rw-r--r-- | ipaserver/install/server/install.py | 3 | ||||
-rw-r--r-- | ipaserver/install/upgradeinstance.py | 4 | ||||
-rw-r--r-- | ipaserver/rpcserver.py | 4 |
7 files changed, 11 insertions, 10 deletions
diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py index 0620d24df..e8820b99e 100644 --- a/ipaserver/install/ipa_restore.py +++ b/ipaserver/install/ipa_restore.py @@ -104,7 +104,7 @@ class RemoveRUVParser(ldif.LDIFParser): objectclass = None nsuniqueid = None - for name, value in entry.iteritems(): + for name, value in entry.items(): name = name.lower() if name == 'objectclass': objectclass = [x.lower() for x in value] diff --git a/ipaserver/install/plugins/update_managed_permissions.py b/ipaserver/install/plugins/update_managed_permissions.py index 563dbb0d6..79af64c38 100644 --- a/ipaserver/install/plugins/update_managed_permissions.py +++ b/ipaserver/install/plugins/update_managed_permissions.py @@ -399,10 +399,10 @@ class update_managed_permissions(Updater): """ for obj in sorted(self.api.Object(), key=lambda o: o.name): managed_permissions = getattr(obj, 'managed_permissions', {}) - for name, template in sorted(managed_permissions.iteritems()): + for name, template in sorted(managed_permissions.items()): yield name, template, obj - for name, template in sorted(NONOBJECT_PERMISSIONS.iteritems()): + for name, template in sorted(NONOBJECT_PERMISSIONS.items()): yield name, template, None diff --git a/ipaserver/install/plugins/update_referint.py b/ipaserver/install/plugins/update_referint.py index c5c80359e..aefe28ce0 100644 --- a/ipaserver/install/plugins/update_referint.py +++ b/ipaserver/install/plugins/update_referint.py @@ -63,7 +63,7 @@ class update_referint(Updater): entry['nsslapd-pluginArg2'] = None # nsslapd-pluginArg3..N -> referint-membership-attr [3..N] - for key in entry.keys(): + for key in list(entry): if key.lower().startswith('nsslapd-pluginarg'): arg_val = entry.single_value[key] if arg_val: diff --git a/ipaserver/install/schemaupdate.py b/ipaserver/install/schemaupdate.py index f98d0e949..432c44d42 100644 --- a/ipaserver/install/schemaupdate.py +++ b/ipaserver/install/schemaupdate.py @@ -56,7 +56,7 @@ def _get_oid_dependency_order(schema, cls): # remove top_node from tree, it breaks ordering # we don't need this, tree from file is not consistent del tree[top_node] - unordered_oids = tree.keys() + unordered_oids = set(tree) # split into two groups, parents and child nodes, and iterate until # child nodes are not empty diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py index 967538334..3feaf8fce 100644 --- a/ipaserver/install/server/install.py +++ b/ipaserver/install/server/install.py @@ -34,6 +34,7 @@ from ipaserver.install.installutils import ( IPA_MODULES, BadHostError, get_fqdn, get_server_ip_address, is_ipa_configured, load_pkcs12, read_password, verify_fqdn) from ipaserver.plugins.ldap2 import ldap2 + try: from ipaserver.install import adtrustinstance _server_trust_ad_installed = True @@ -342,7 +343,7 @@ def install_check(installer): sys.exit("Directory Manager password required") try: cache_vars = read_cache(dm_password) - for name, value in cache_vars.iteritems(): + for name, value in cache_vars.items(): if name not in options.__dict__: options.__dict__[name] = value if cache_vars.get('external_ca', False): diff --git a/ipaserver/install/upgradeinstance.py b/ipaserver/install/upgradeinstance.py index 10f7c2ce0..684a3dd99 100644 --- a/ipaserver/install/upgradeinstance.py +++ b/ipaserver/install/upgradeinstance.py @@ -123,7 +123,7 @@ class ModifyLDIF(ldif.LDIFParser): def handle(self, dn, entry): if dn in self.remove_dict: - for name, value in self.remove_dict[dn].iteritems(): + for name, value in self.remove_dict[dn].items(): if value is None: attribute = [] else: @@ -135,7 +135,7 @@ class ModifyLDIF(ldif.LDIFParser): del entry[name] if dn in self.add_dict: - for name, value in self.add_dict[dn].iteritems(): + for name, value in self.add_dict[dn].items(): attribute = entry.setdefault(name, []) attribute.extend([v for v in value if v not in attribute]) diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py index df75d98bb..3b0fee534 100644 --- a/ipaserver/rpcserver.py +++ b/ipaserver/rpcserver.py @@ -201,7 +201,7 @@ def params_2_args_options(params): def nicify_query(query, encoding='utf-8'): if not query: return - for (key, value) in query.iteritems(): + for (key, value) in query.items(): if len(value) == 0: yield (key, None) elif len(value) == 1: @@ -493,7 +493,7 @@ class jsonserver(WSGIExecutioner, HTTP_Status): options = params[1] if not isinstance(options, dict): raise JSONError(error=_('params[1] (aka options) must be a dict')) - options = dict((str(k), v) for (k, v) in options.iteritems()) + options = dict((str(k), v) for (k, v) in options.items()) return (method, args, options, _id) class AuthManagerKerb(AuthManager): |