new API for the fillobj feature and severaaal fixes
This commit is contained in:
parent
fc4badf88e
commit
edc83df3a1
11 changed files with 60 additions and 42 deletions
|
|
@ -25,6 +25,7 @@ import sys
|
|||
|
||||
from weboob.core import CallErrors
|
||||
from weboob.core.backends import BackendsConfig
|
||||
from weboob.tools.backend import NotSupportedObject
|
||||
|
||||
from .base import BackendNotFound, BaseApplication
|
||||
from .formatters.load import formatters, load_formatter
|
||||
|
|
@ -277,10 +278,11 @@ class ConsoleApplication(BaseApplication):
|
|||
for i, (backend, result) in enumerate(self.weboob.do(function, *args, **kwargs)):
|
||||
if self.options.count and i == self.options.count:
|
||||
break
|
||||
fields = set(self.selected_fields) - set('*')
|
||||
if fields:
|
||||
try:
|
||||
backend.browser.fillobj(result, fields)
|
||||
except Exception, e:
|
||||
logging.warning(u'Could not retrieve required fields (%s): %s' % (','.join(fields), e))
|
||||
if self.selected_fields:
|
||||
fields = set(self.selected_fields) - set('*')
|
||||
if fields:
|
||||
try:
|
||||
backend.fillobj(result, fields)
|
||||
except NotSupportedObject, e:
|
||||
logging.warning(u'Could not retrieve required fields (%s): %s' % (','.join(fields), e))
|
||||
yield backend, result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue