Commit b6e98e17 authored by ntome's avatar ntome

python3: replace old dict methods iter*

TODO this is less efficient on python2
parent d06e99a4
......@@ -159,7 +159,7 @@ class MyThread(Thread):
self.bot.set_weboob(self.weboob)
def run(self):
for ev in self.bot.joined.itervalues():
for ev in self.bot.joined.values():
ev.wait()
self.weboob.repeat(5, self.check_tasks)
......
......@@ -32,7 +32,7 @@
${video_item(item)}
% endfor
% else:
% for backend, items in sorted(results.iteritems()):
% for backend, items in sorted(results.items()):
<h2>${backend}</h2>
% for item in items:
${video_item(item)}
......
......@@ -143,7 +143,7 @@ class Weboob(ConsoleApplication):
else:
capApplicationDict[capability] = [application]
return OrderedDict([(k, v) for k, v in sorted(capApplicationDict.iteritems())])
return OrderedDict([(k, v) for k, v in sorted(capApplicationDict.items())])
def get_application_capabilities(self, application):
if hasattr(application, 'CAPS') and application.CAPS:
......
......@@ -70,7 +70,7 @@ class ManpageHelpFormatter(optparse.HelpFormatter):
self.app.weboob.modules_loader.load_all()
caps = self.app.CAPS if isinstance(self.app.CAPS, tuple) else (self.app.CAPS,)
modules = []
for name, module in self.app.weboob.modules_loader.loaded.iteritems():
for name, module in self.app.weboob.modules_loader.loaded.items():
if module.has_caps(*caps):
modules.append(u'* %s (%s)' % (name, module.description))
if len(modules) > 0:
......@@ -80,7 +80,7 @@ class ManpageHelpFormatter(optparse.HelpFormatter):
def format_commands(self, commands):
s = u''
for section, cmds in commands.iteritems():
for section, cmds in commands.items():
if len(cmds) == 0:
continue
s += '.SH %s COMMANDS\n' % section.upper()
......@@ -130,7 +130,7 @@ def main():
else:
print("Loaded %s" % fname)
# Find the applications we can handle
for klass in script.__dict__.itervalues():
for klass in script.__dict__.values():
if inspect.isclass(klass) and issubclass(klass, Application) and klass.VERSION:
analyze_application(klass, fname)
finally:
......
......@@ -16,7 +16,7 @@ backends_without_tests = []
backends_without_icons = []
backends_using_deprecated = []
for name, backend in weboob.modules_loader.loaded.iteritems():
for name, backend in weboob.modules_loader.loaded.items():
path = backend.package.__path__[0]
if not os.path.exists(os.path.join(path, 'test.py')):
backends_without_tests.append(name)
......
......@@ -376,7 +376,7 @@ class AccountListFormatter(IFormatter):
def flush(self):
self.output(u'------------------------------------------%s+----------+----------' % (('-' * 15) if not self.interactive else ''))
for currency, currency_totals in sorted(self.totals.iteritems(), key=lambda k_v: (k_v[1],k_v[0])):
for currency, currency_totals in sorted(self.totals.items(), key=lambda k_v: (k_v[1],k_v[0])):
balance = currency_totals['balance']
coming = currency_totals['coming']
......
......@@ -233,7 +233,7 @@ h2. Attendees
self.format_duration() or '_Unknown_',
self.location or '_Unknown_')
for member in self.members.itervalues():
for member in self.members.values():
if self.date:
availabilities = ''
else:
......@@ -355,7 +355,7 @@ class Boobathon(ReplApplication):
Display progress of members.
"""
self.event.load()
for member in self.event.members.itervalues():
for member in self.event.members.values():
if member.is_me and member is self.event.winner:
status = '\o/ ->'
elif member.is_me:
......@@ -421,7 +421,7 @@ class Boobathon(ReplApplication):
if i >= 0 and i%2:
# second line of task, see if we'll stop
stop = True
for mem in self.event.members.itervalues():
for mem in self.event.members.values():
if len(mem.tasks) > (i/2+1):
# there are more tasks, don't stop now
stop = False
......@@ -455,7 +455,7 @@ class Boobathon(ReplApplication):
args = line.split(' ')
if len(args) == 2:
self.event.load()
return [member.name for member in self.event.members.itervalues()]
return [member.name for member in self.event.members.values()]
def do_close(self, name):
"""
......@@ -465,7 +465,7 @@ class Boobathon(ReplApplication):
"""
self.event.load()
for member in self.event.members.itervalues():
for member in self.event.members.values():
if member.name == name:
self.event.winner = member
if self.save_event('Close event'):
......@@ -533,7 +533,7 @@ class Boobathon(ReplApplication):
Display members information.
"""
self.event.load()
for member in self.event.members.itervalues():
for member in self.event.members.values():
print(member.name)
print('-' * len(member.name))
print('Repository:', member.repository)
......
......@@ -289,7 +289,7 @@ class Boobmsg(ReplApplication):
else:
results[field.backend] = [field]
for name, fields in results.iteritems():
for name, fields in results.items():
print(':: %s ::' % name)
for f in fields:
if f.flags & f.FIELD_HTML:
......
......@@ -72,7 +72,7 @@ class IssueFormatter(IFormatter):
result += self.format_attr(obj, 'category')
result += self.format_attr(obj, 'assignee')
if hasattr(obj, 'fields') and not empty(obj.fields):
for key, value in obj.fields.iteritems():
for key, value in obj.fields.items():
result += self.format_key(key.capitalize(), value)
if hasattr(obj, 'attachments') and obj.attachments:
result += '\n%s\n' % self.colored('Attachments:', 'green')
......@@ -310,7 +310,7 @@ class BoobTracker(ReplApplication):
for o in objects_list])
output += 'X-Available-%s: %s\n' % (self.sanitize_key(key), availables)
for key, value in issue.fields.iteritems():
for key, value in issue.fields.items():
output += '%s: %s\n' % (self.sanitize_key(key), value or '')
# TODO: Add X-Available-* for lists
......
......@@ -66,7 +66,7 @@ class HousingFormatter(IFormatter):
if hasattr(obj, 'details') and obj.details:
result += '\n\n%sDetails%s\n' % (self.BOLD, self.NC)
for key, value in obj.details.iteritems():
for key, value in obj.details.items():
result += ' %s: %s\n' % (key, value)
return result
......
......@@ -74,7 +74,7 @@ class HaveDate(Boobmsg):
self.bcall_errors_handler(e)
optimizations = self.storage.get('optims')
for optim, backends in optimizations.iteritems():
for optim, backends in optimizations.items():
self.optims('start', backends, optim, store=False)
return ReplApplication.main(self, argv)
......@@ -100,7 +100,7 @@ class HaveDate(Boobmsg):
for optim in self.do('get_optimization', optim_name, backends=backend_names):
if optim:
backends_optims[optim.backend] = optim
for backend_name, optim in backends_optims.iteritems():
for backend_name, optim in backends_optims.items():
if len(optim.CONFIG) == 0:
print('%s.%s does not require configuration.' % (backend_name, optim_name))
continue
......@@ -114,7 +114,7 @@ class HaveDate(Boobmsg):
params = {}
print('Configuration of %s.%s' % (backend_name, optim_name))
print('-----------------%s-%s' % ('-' * len(backend_name), '-' * len(optim_name)))
for key, value in optim.CONFIG.iteritems():
for key, value in optim.CONFIG.items():
params[key] = self.ask(value, default=params[key] if (key in params) else value.default)
optim.set_config(params)
......@@ -236,7 +236,7 @@ class HaveDate(Boobmsg):
backends.add(optim.backend)
backends = sorted(backends)
for name, backends_status in optims.iteritems():
for name, backends_status in optims.items():
line = [('name', name)]
for b in backends:
try:
......
......@@ -198,7 +198,7 @@ class Pastoob(ReplApplication):
seconds = 0
for number, unit in parts:
for rx, secs in argsmap.iteritems():
for rx, secs in argsmap.items():
if re.match('^(%s)$' % rx, unit):
seconds += float(number) * float(secs)
......
......@@ -345,7 +345,7 @@ class MainWindow(QtMainWindow):
child.widget().deleteLater()
if housing.details:
for key, value in housing.details.iteritems():
for key, value in housing.details.items():
if empty(value):
continue
label = QLabel(value)
......
......@@ -256,7 +256,7 @@ class ContactProfile(QWidget):
missing_fields.add('profile')
elif not self.loaded_profile:
self.loaded_profile = True
for head in contact.profile.itervalues():
for head in contact.profile.values():
if head.flags & head.HEAD:
widget = self.ui.headWidget
else:
......@@ -271,7 +271,7 @@ class ContactProfile(QWidget):
if node.flags & node.SECTION:
value = QWidget()
value.setLayout(QFormLayout())
for sub in node.value.itervalues():
for sub in node.value.values():
self.process_node(sub, value)
elif isinstance(node.value, list):
value = QLabel('<br />'.join(unicode(s) for s in node.value))
......@@ -491,7 +491,7 @@ class ContactsWidget(QWidget):
pass
img = None
for photo in contact.photos.itervalues():
for photo in contact.photos.values():
if photo.thumbnail_data:
img = QImage.fromData(photo.thumbnail_data)
break
......
......@@ -90,7 +90,7 @@ class EventsWidget(QWidget):
pass
img = None
for photo in contact.photos.itervalues():
for photo in contact.photos.values():
if photo.thumbnail_data:
img = QImage.fromData(photo.thumbnail_data)
break
......
......@@ -81,7 +81,7 @@ class WebContentEdit(ReplApplication):
params = '-p'
os.system("%s %s %s" % (editor, params, ' '.join('"%s"' % path.replace('"', '\\"') for path in paths)))
for path, content in paths.iteritems():
for path, content in paths.items():
with open(path, 'r') as f:
data = f.read()
try:
......@@ -106,7 +106,7 @@ class WebContentEdit(ReplApplication):
errors = CallErrors([])
for content in contents:
path = [path for path, c in paths.iteritems() if c == content][0]
path = [path for path, c in paths.items() if c == content][0]
self.stdout.write('Pushing %s...' % content.id.encode('utf-8'))
self.stdout.flush()
try:
......
......@@ -59,7 +59,7 @@ class ModuleInfoFormatter(IFormatter):
result += '| Location | %s\n' % minfo['location']
if 'config' in minfo:
first = True
for key, field in minfo['config'].iteritems():
for key, field in minfo['config'].items():
label = field['label']
if field['default'] is not None:
label += ' (default: %s)' % field['default']
......@@ -186,7 +186,7 @@ class WeboobCfg(ReplApplication):
('Configuration', ', '.join(
'%s=%s' % (key, ('*****' if key in module.config and module.config[key].masked
else value))
for key, value in params.iteritems())),
for key, value in params.items())),
])
self.format(row)
......@@ -243,7 +243,7 @@ class WeboobCfg(ReplApplication):
Show available modules.
"""
caps = line.split()
for name, info in sorted(self.weboob.repositories.get_all_modules_info(caps).iteritems()):
for name, info in sorted(self.weboob.repositories.get_all_modules_info(caps).items()):
row = OrderedDict([('Name', name),
('Capabilities', CapabilitiesWrapper(info.capabilities)),
('Description', info.description),
......@@ -287,7 +287,7 @@ class WeboobCfg(ReplApplication):
module_info['location'] = '%s' % (minfo.url or os.path.join(minfo.path, minfo.name))
if module:
module_info['config'] = {}
for key, field in module.config.iteritems():
for key, field in module.config.items():
module_info['config'][key] = {'label': field.label,
'default': field.default,
'description': field.description,
......
......@@ -59,7 +59,7 @@ class WeboobDebug(Application):
locs = dict(backend=backend, browser=backend.browser, application=self, weboob=self.weboob)
banner = 'Weboob debug shell\nBackend "%s" loaded.\nAvailable variables:\n' % backend_name \
+ '\n'.join([' %s: %s' % (k, v) for k, v in locs.iteritems()])
+ '\n'.join([' %s: %s' % (k, v) for k, v in locs.items()])
if self.options.bpython:
funcs = [self.bpython, self.ipython, self.python]
......
......@@ -137,7 +137,7 @@ class WeboobRepos(ReplApplication):
else:
print('Keyring is up to date')
for name, module in r.modules.iteritems():
for name, module in r.modules.items():
tarname = os.path.join(repo_path, '%s.tar.gz' % name)
if r.signed:
sigfiles.append(os.path.basename(tarname))
......
......@@ -159,7 +159,7 @@ class Browser(object):
request = response.request
with open(response_filepath + '-request.txt', 'w') as f:
f.write('%s %s\n\n\n' % (request.method, request.url))
for key, value in request.headers.iteritems():
for key, value in request.headers.items():
f.write('%s: %s\n' % (key, value))
if request.body is not None: # separate '' from None
f.write('\n\n\n%s' % request.body)
......@@ -167,7 +167,7 @@ class Browser(object):
if hasattr(response.elapsed, 'total_seconds'):
f.write('Time: %3.3fs\n' % response.elapsed.total_seconds())
f.write('%s %s\n\n\n' % (response.status_code, response.reason))
for key, value in response.headers.iteritems():
for key, value in response.headers.items():
f.write('%s: %s\n' % (key, value))
match_filepath = os.path.join(self.responses_dirname, 'url_response_match.txt')
......@@ -397,7 +397,7 @@ class Browser(object):
req.data = req.data.encode(data_encoding)
if isinstance(req.data, dict) and data_encoding:
req.data = OrderedDict([(k, v.encode(data_encoding) if isinstance(v, unicode) else v)
for k, v in req.data.iteritems()])
for k, v in req.data.items()])
if referrer is None:
referrer = self.get_referrer(self.url, url)
......@@ -658,7 +658,7 @@ class PagesBrowser(DomainBrowser):
self.page = None
self._urls = deepcopy(self._urls)
for url in self._urls.itervalues():
for url in self._urls.values():
url.browser = self
def open(self, *args, **kwargs):
......@@ -677,7 +677,7 @@ class PagesBrowser(DomainBrowser):
def internal_callback(response):
# Try to handle the response page with an URL instance.
response.page = None
for url in self._urls.itervalues():
for url in self._urls.values():
page = url.handle(response)
if page is not None:
self.logger.debug('Handle %s with %s' % (response.url, page.__class__.__name__))
......
......@@ -125,7 +125,7 @@ class ListElement(AbstractElement):
self.objects = OrderedDict()
def __call__(self, *args, **kwargs):
for key, value in kwargs.iteritems():
for key, value in kwargs.items():
self.env[key] = value
return self.__iter__()
......@@ -173,7 +173,7 @@ class ListElement(AbstractElement):
self.check_next_page()
def flush(self):
for obj in self.objects.itervalues():
for obj in self.objects.values():
yield obj
def check_next_page(self):
......@@ -352,7 +352,7 @@ class TableElement(ListElement):
colnum = 0
for el in self.el.xpath(self.head_xpath):
title = self.cleaner.clean(el)
for name, titles in columns.iteritems():
for name, titles in columns.items():
if name in self._cols:
continue
if title.lower() in [s for s in titles if isinstance(s, (str, unicode))] or \
......
......@@ -94,7 +94,7 @@ class JSValue(Regexp):
def to_python(self, m):
"Convert MatchObject to python value"
values = m.groupdict()
for t, v in values.iteritems():
for t, v in values.items():
if v is not None:
break
if self.need_type and t != self.need_type:
......
......@@ -740,7 +740,7 @@ class Time(Filter):
m = self._regexp.search(txt)
if m:
kwargs = {}
for key, index in self.kwargs.iteritems():
for key, index in self.kwargs.items():
kwargs[key] = int(m.groupdict()[index] or 0)
return self.klass(**kwargs)
......
......@@ -74,7 +74,7 @@ class URL(object):
# XXX use unquote on current params values because if there are spaces
# or special characters in them, it is encoded only in but not in kwargs.
return self.browser.page and isinstance(self.browser.page, self.klass) \
and (params is None or params == dict([(k,unquote(v)) for k,v in self.browser.page.params.iteritems()]))
and (params is None or params == dict([(k,unquote(v)) for k,v in self.browser.page.params.items()]))
def stay_or_go(self, **kwargs):
"""
......
......@@ -68,7 +68,7 @@ def find_object(mylist, error=None, **kwargs):
"""
for a in mylist:
found = True
for key, value in kwargs.iteritems():
for key, value in kwargs.items():
if getattr(a, key) != value:
found = False
break
......@@ -407,7 +407,7 @@ class BaseObject(object):
if hasattr(self, 'id') and self.id is not None:
yield 'id', self.id
for name, field in self._fields.iteritems():
for name, field in self._fields.items():
yield name, field.value
def __eq__(self, obj):
......@@ -566,7 +566,7 @@ class Currency(object):
"""
curtexts = klass.EXTRACTOR.sub(' ', text.upper()).split()
for curtext in curtexts:
for currency, symbols in klass.CURRENCIES.iteritems():
for currency, symbols in klass.CURRENCIES.items():
if curtext in currency:
return currency
for symbol in symbols:
......
......@@ -124,7 +124,7 @@ class Contact(BaseContact):
self.photos[name] = ContactPhoto(name)
photo = self.photos[name]
for key, value in kwargs.iteritems():
for key, value in kwargs.items():
setattr(photo, key, value)
def get_text(self):
......@@ -132,7 +132,7 @@ class Contact(BaseContact):
result = u''
if node.flags & node.SECTION:
result += u'\t' * level + node.label + '\n'
for sub in node.value.itervalues():
for sub in node.value.values():
result += print_node(sub, level + 1)
else:
if isinstance(node.value, (tuple, list)):
......@@ -156,10 +156,10 @@ class Contact(BaseContact):
result += u'Status: %s (%s)\n' % (s, self.status_msg)
result += u'URL: %s\n' % self.url
result += u'Photos:\n'
for name, photo in self.photos.iteritems():
for name, photo in self.photos.items():
result += u'\t%s%s\n' % (photo, ' (hidden)' if photo.hidden else '')
result += u'\nProfile:\n'
for head in self.profile.itervalues():
for head in self.profile.values():
result += print_node(head)
result += u'Description:\n'
for s in self.summary.split('\n'):
......
......@@ -146,7 +146,7 @@ class BackendsConfig(object):
except DuplicateSectionError:
raise BackendAlreadyExists(backend_name)
config.set(backend_name, '_module', module_name)
for key, value in params.iteritems():
for key, value in params.items():
config.set(backend_name, key, value)
self._write_config(config)
......
......@@ -211,7 +211,7 @@ class WebNip(object):
:type module: :class:`basestring`
:rtype: iter[:class:`weboob.tools.backend.Module`]
"""
for _, backend in sorted(self.backend_instances.iteritems()):
for _, backend in sorted(self.backend_instances.items()):
if (caps is None or backend.has_caps(caps)) and \
(module is None or backend.NAME == module):
with backend:
......
......@@ -334,7 +334,7 @@ class Repository(object):
if private:
config.set(DEFAULTSECT, 'url', self.url)
for module in self.modules.itervalues():
for module in self.modules.values():
config.add_section(module.name)
for key, value in module.dump():
config.set(module.name, key, to_unicode(value).encode('utf-8'))
......@@ -370,7 +370,7 @@ class Versions(object):
def save(self):
config = RawConfigParser()
for name, version in self.versions.iteritems():
for name, version in self.versions.items():
config.set(DEFAULTSECT, name, version)
with open(os.path.join(self.path, self.VERSIONS_LIST), 'wb') as fp:
config.write(fp)
......@@ -490,7 +490,7 @@ class Repositories(object):
"""
modules = {}
for repos in reversed(self.repositories):
for name, info in repos.modules.iteritems():
for name, info in repos.modules.items():
if name not in modules and (not caps or info.has_caps(caps)):
modules[name] = self._extend_module_info(repos, info)
return modules
......@@ -621,7 +621,7 @@ class Repositories(object):
self.update_repositories(progress)
to_update = []
for name, info in self.get_all_modules_info().iteritems():
for name, info in self.get_all_modules_info().items():
if not info.is_local() and info.is_installed():
if self.versions.get(name) != info.version:
to_update.append(info)
......
......@@ -152,7 +152,7 @@ class Scheduler(IScheduler):
def _wait_to_stop(self):
self.want_stop()
with self.mutex:
for e in self.queue.itervalues():
for e in self.queue.values():
e.cancel()
e.join()
self.queue = {}
......@@ -171,7 +171,7 @@ class Scheduler(IScheduler):
def want_stop(self):
self.stop_event.set()
with self.mutex:
for t in self.queue.itervalues():
for t in self.queue.values():
t.cancel()
# Contrary to _wait_to_stop(), don't call t.join
# because want_stop() have to be non-blocking.
......
......@@ -107,7 +107,7 @@ class ConsoleApplication(Application):
def unload_backends(self, *args, **kwargs):
unloaded = self.weboob.unload_backends(*args, **kwargs)
for backend in unloaded.itervalues():
for backend in unloaded.values():
try:
self.enabled_backends.remove(backend)
except KeyError:
......@@ -130,7 +130,7 @@ class ConsoleApplication(Application):
self.edit_backend(err.backend_name)
self.load_backends(names=[err.backend_name])
for name, backend in ret.iteritems():
for name, backend in ret.items():
self.enabled_backends.add(backend)
self.check_loaded_backends()
......@@ -152,7 +152,7 @@ class ConsoleApplication(Application):
while r != 'q':
modules = []
print('\nAvailable modules:')
for name, info in sorted(self.weboob.repositories.get_all_modules_info().iteritems()):
for name, info in sorted(self.weboob.repositories.get_all_modules_info().items()):
if not self.is_module_loadable(info):
continue
modules.append(name)
......@@ -277,7 +277,7 @@ class ConsoleApplication(Application):
website = 'with backend %s' % backend.name
while True:
asked_config = False
for key, prop in backend.klass.ACCOUNT_REGISTER_PROPERTIES.iteritems():
for key, prop in backend.klass.ACCOUNT_REGISTER_PROPERTIES.items():
if not asked_config:
asked_config = True
print('Configuration of new account %s' % website)
......@@ -298,7 +298,7 @@ class ConsoleApplication(Application):
else:
break
backend_config = {}
for key, value in account.properties.iteritems():
for key, value in account.properties.items():
if key in backend.config:
backend_config[key] = value.get()
......@@ -348,7 +348,7 @@ class ConsoleApplication(Application):
# ask for params non-specified on command-line arguments
asked_config = False
for key, value in config.iteritems():
for key, value in config.items():
if not asked_config:
asked_config = True
print('')
......@@ -373,7 +373,7 @@ class ConsoleApplication(Application):
try:
config = config.load(self.weboob, module.name, backend_name, params, nofail=True)
for key, value in params.iteritems():
for key, value in params.items():
if key not in config:
continue
config[key].set(value)
......@@ -477,10 +477,10 @@ class ConsoleApplication(Application):
for s in v.choices:
if s == v.default:
aliases[s.upper()] = s
for key, value in v.choices.iteritems():
for key, value in v.choices.items():
print(' %s%s%s: %s' % (self.BOLD, key, self.NC, value))
else:
for n, (key, value) in enumerate(v.choices.iteritems()):
for n, (key, value) in enumerate(v.choices.items()):
print(' %s%2d)%s %s' % (self.BOLD, n + 1, self.NC,
value.encode(self.encoding)))
aliases[str(n + 1)] = key
......
......@@ -49,4 +49,4 @@ class CSVFormatter(IFormatter):
writer.writerow([unicode(v).encode('utf-8') for v in item.keys()])
self.started = True
writer.writerow([unicode(v).encode('utf-8') for v in item.itervalues()])
writer.writerow([unicode(v).encode('utf-8') for v in item.values()])
......@@ -190,7 +190,7 @@ class IFormatter(object):
if selected_fields:
obj = obj.copy()
for name, value in obj.iteritems():
for name, value in obj.items():
if name not in selected_fields:
obj.pop(name)
......
......@@ -37,7 +37,7 @@ class MultilineFormatter(IFormatter):
def format_dict(self, item):
result = u'\n'.join(u'%s%s' % (
(u'%s%s' % (k, self.key_value_separator) if self.display_keys else ''), v)
for k, v in item.iteritems() if (v is not NotLoaded and v is not NotAvailable))
for k, v in item.items() if (v is not NotLoaded and v is not NotAvailable))
if len(item) > 1:
result += self.after_item
return result
......@@ -33,4 +33,4 @@ class SimpleFormatter(IFormatter):
def format_dict(self, item):
return self.field_separator.join(u'%s%s' % (
(u'%s%s' % (k, self.key_value_separator) if self.display_keys else ''), v)
for k, v in item.iteritems())
for k, v in item.items())
......@@ -200,7 +200,7 @@ class BackendCfg(QDialog):
def loadModules(self):
self.ui.modulesList.clear()
for name, module in sorted(self.weboob.repositories.get_all_modules_info(self.caps).iteritems()):
for name, module in sorted(self.weboob.repositories.get_all_modules_info(self.caps).items()):
item = QListWidgetItem(name.capitalize())
self.set_icon(item, module)
self.ui.modulesList.addItem(item)
......@@ -328,7 +328,7 @@ class BackendCfg(QDialog):
info = self.weboob.repositories.get_module_info(module_name)
if info and (info.is_installed() or self.installModule(info)):
module = self.weboob.modules_loader.get_or_load_module(module_name)
for key, value in module.config.load(self.weboob, module_name, backend_name, params, nofail=True).iteritems():