ReplApplication.get_object(): fix backend lookup
because self.enabled_backends contains BaseBackend objects and not backend name strings Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
e7805cec12
commit
0668db2b5a
1 changed files with 4 additions and 1 deletions
|
|
@ -265,7 +265,10 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
# remove backends that do not have the required method
|
||||
new_backend_names=[]
|
||||
for backend in backend_names:
|
||||
actual_backend = self.weboob.get_backend(backend)
|
||||
if isinstance(backend,str):
|
||||
actual_backend = self.weboob.get_backend(backend)
|
||||
else:
|
||||
actual_backend = backend
|
||||
if getattr(actual_backend, method, None) is not None:
|
||||
new_backend_names.append(backend)
|
||||
backend_names = tuple(new_backend_names)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue