mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 02:04:04 +08:00
Do not use dict iter methods for Python3 compatibility
This commit is contained in:
@@ -109,7 +109,7 @@ class AuthnzManager(object):
|
||||
def _unify_provider_name(self, provider):
|
||||
if provider.lower() in self.oidc_backends_config:
|
||||
return provider.lower()
|
||||
for k, v in BACKENDS_NAME.iteritems():
|
||||
for k, v in BACKENDS_NAME.items():
|
||||
if v == provider:
|
||||
return k.lower()
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ DISCONNECT_PIPELINE = (
|
||||
class PSAAuthnz(IdentityProvider):
|
||||
def __init__(self, provider, oidc_config, oidc_backend_config):
|
||||
self.config = {'provider': provider.lower()}
|
||||
for key, value in oidc_config.iteritems():
|
||||
for key, value in oidc_config.items():
|
||||
self.config[setting_name(key)] = value
|
||||
|
||||
self.config[setting_name('USER_MODEL')] = 'models.User'
|
||||
|
||||
@@ -142,7 +142,7 @@ def inputs_recursive(trans, input_params, param_values, depth=1, upgrade_message
|
||||
if upgrade_messages is None:
|
||||
upgrade_messages = {}
|
||||
|
||||
for input_index, input in enumerate(input_params.itervalues()):
|
||||
for input_index, input in enumerate(input_params.values()):
|
||||
if input.name in param_values:
|
||||
if input.type == "repeat":
|
||||
for i in range(len(param_values[input.name])):
|
||||
|
||||
@@ -223,7 +223,7 @@ class VisualizationsRegistry(object):
|
||||
|
||||
def get_plugins(self):
|
||||
result = []
|
||||
for plugin in self.plugins.itervalues():
|
||||
for plugin in self.plugins.values():
|
||||
result.append(plugin.to_dict())
|
||||
return sorted(result, key=lambda k: k.get('html'))
|
||||
|
||||
|
||||
@@ -558,7 +558,7 @@ class AdminGalaxy(controller.JSAppLauncher, AdminActions, UsesQuotaMixin, QuotaP
|
||||
)
|
||||
|
||||
for data_table_elem_name, data_table in sorted_data_tables:
|
||||
for filename, file_dict in data_table.filenames.iteritems():
|
||||
for filename, file_dict in data_table.filenames.items():
|
||||
file_missing = ['file missing'] \
|
||||
if not file_dict.get('found') else []
|
||||
data.append({
|
||||
|
||||
@@ -23,7 +23,7 @@ class DataManager(BaseUIController):
|
||||
message = kwd.get('message', '')
|
||||
status = kwd.get('status', 'info')
|
||||
data_managers = []
|
||||
for data_manager_id, data_manager in sorted(trans.app.data_managers.data_managers.iteritems(),
|
||||
for data_manager_id, data_manager in sorted(trans.app.data_managers.data_managers.items(),
|
||||
key=lambda data_manager: data_manager[1].name):
|
||||
data_managers.append({'toolUrl': web.url_for(controller='root',
|
||||
tool_id=data_manager.tool.id),
|
||||
|
||||
Reference in New Issue
Block a user