Remove condition from core
This commit is contained in:
parent
29567cffa4
commit
9a0f9d0fc9
4 changed files with 11 additions and 26 deletions
|
|
@ -305,7 +305,6 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
"""
|
||||
backends = kwargs.pop('backends', None)
|
||||
kwargs['backends'] = self.enabled_backends if backends is None else backends
|
||||
kwargs['condition'] = self.condition
|
||||
fields = kwargs.pop('fields', self.selected_fields) or self.selected_fields
|
||||
if '$direct' in fields:
|
||||
fields = []
|
||||
|
|
@ -449,10 +448,7 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
|
||||
This method can be overrided to support more exceptions types.
|
||||
"""
|
||||
if isinstance(error, ResultsConditionError):
|
||||
print >>sys.stderr, u'Error(%s): condition error: %s' % (backend.name, error)
|
||||
else:
|
||||
return super(ReplApplication, self).bcall_error_handler(backend, error, backtrace)
|
||||
return super(ReplApplication, self).bcall_error_handler(backend, error, backtrace)
|
||||
|
||||
def bcall_errors_handler(self, errors, ignore=()):
|
||||
if self.interactive:
|
||||
|
|
|
|||
|
|
@ -18,11 +18,16 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from weboob.core.bcall import IResultsCondition, ResultsConditionError
|
||||
|
||||
|
||||
__all__ = ['ResultsCondition', 'ResultsConditionError']
|
||||
|
||||
class IResultsCondition(object):
|
||||
def is_valid(self, obj):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class ResultsConditionError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class Condition(object):
|
||||
def __init__(self, left, op, right):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue