rename exception
This commit is contained in:
parent
084d7ebd94
commit
d067808416
2 changed files with 5 additions and 5 deletions
|
|
@ -25,7 +25,7 @@ import sys
|
||||||
|
|
||||||
from weboob.core import CallErrors
|
from weboob.core import CallErrors
|
||||||
from weboob.core.backends import BackendsConfig
|
from weboob.core.backends import BackendsConfig
|
||||||
from weboob.tools.backend import NotSupportedObject
|
from weboob.tools.backend import ObjectNotSupported
|
||||||
|
|
||||||
from .base import BackendNotFound, BaseApplication
|
from .base import BackendNotFound, BaseApplication
|
||||||
from .formatters.load import formatters, load_formatter
|
from .formatters.load import formatters, load_formatter
|
||||||
|
|
@ -286,6 +286,6 @@ class ConsoleApplication(BaseApplication):
|
||||||
if fields:
|
if fields:
|
||||||
try:
|
try:
|
||||||
backend.fillobj(result, fields)
|
backend.fillobj(result, fields)
|
||||||
except NotSupportedObject, e:
|
except ObjectNotSupported, e:
|
||||||
logging.warning(u'Could not retrieve required fields (%s): %s' % (','.join(fields), e))
|
logging.warning(u'Could not retrieve required fields (%s): %s' % (','.join(fields), e))
|
||||||
yield backend, result
|
yield backend, result
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@ import os
|
||||||
from threading import RLock
|
from threading import RLock
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['BaseBackend', 'NotSupportedObject']
|
__all__ = ['BaseBackend', 'ObjectNotSupported']
|
||||||
|
|
||||||
|
|
||||||
class NotSupportedObject(Exception): pass
|
class ObjectNotSupported(Exception): pass
|
||||||
|
|
||||||
class BackendStorage(object):
|
class BackendStorage(object):
|
||||||
def __init__(self, name, storage):
|
def __init__(self, name, storage):
|
||||||
|
|
@ -179,4 +179,4 @@ class BaseBackend(object):
|
||||||
if isinstance(obj, key):
|
if isinstance(obj, key):
|
||||||
return value(self, obj, fields)
|
return value(self, obj, fields)
|
||||||
|
|
||||||
raise NotSupportedObject('The object of type %s is not supported by the backend %s' % (type(obj), self))
|
raise ObjectNotSupported('The object of type %s is not supported by the backend %s' % (type(obj), self))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue