Remove backend for do() calls
This commit is contained in:
parent
40a8bc0ce1
commit
628c63f899
33 changed files with 112 additions and 113 deletions
|
|
@ -144,7 +144,7 @@ class BoobankMuninPlugin(object):
|
|||
accounts = []
|
||||
if self.monitored_accounts is not None:
|
||||
d = {}
|
||||
for backend, account in self.weboob.do('iter_accounts'):
|
||||
for account in self.weboob.do('iter_accounts'):
|
||||
if self.monitored(account):
|
||||
d['%s@%s' % (account.id, account.backend)] = account
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ class BoobankMuninPlugin(object):
|
|||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
accounts = reversed([a for b, a in self.weboob.do('iter_accounts')])
|
||||
accounts = reversed([a for a in self.weboob.do('iter_accounts')])
|
||||
|
||||
first = True
|
||||
for account in accounts:
|
||||
|
|
@ -191,7 +191,7 @@ class BoobankMuninPlugin(object):
|
|||
self.new_cache('boobank-munin')
|
||||
self.weboob.load_backends(CapBank)
|
||||
try:
|
||||
for backend, account in self.weboob.do('iter_accounts'):
|
||||
for account in self.weboob.do('iter_accounts'):
|
||||
if self.monitored(account):
|
||||
balance = account.balance
|
||||
if account.coming and self.add_coming:
|
||||
|
|
|
|||
|
|
@ -224,9 +224,9 @@ class GenericMuninPlugin(object):
|
|||
results = []
|
||||
for result in self.weboob.do(self.object_list):
|
||||
results.append(result)
|
||||
for backend, result in results:
|
||||
for result in results:
|
||||
try:
|
||||
for i in self.weboob.do(self.do[0], result.id, backends=backend):
|
||||
for i in self.weboob.do(self.do[0], result.id, backends=result.backend):
|
||||
yield i
|
||||
# Do not crash if one module does not implement the feature
|
||||
except CallErrors:
|
||||
|
|
@ -284,7 +284,7 @@ class GenericMuninPlugin(object):
|
|||
objects = []
|
||||
if self.tomonitore or self.exclude:
|
||||
d = {}
|
||||
for backend, result in self.build_do():
|
||||
for result in self.build_do():
|
||||
if self.monitored(result):
|
||||
d[self.result2weboobid(result)] = result
|
||||
|
||||
|
|
@ -329,7 +329,7 @@ class GenericMuninPlugin(object):
|
|||
self.new_cache(self.name)
|
||||
self.weboob.load_backends(self.capa)
|
||||
try:
|
||||
for backend, result in self.build_do():
|
||||
for result in self.build_do():
|
||||
if self.monitored(result):
|
||||
value = self.get_value(result)
|
||||
if value is not NotAvailable:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue