fix #372 conditions should not be treated by formatters

This commit is contained in:
Christophe Benz 2010-11-14 15:04:02 +01:00
commit 5fc8c14b2d
3 changed files with 16 additions and 14 deletions

View file

@ -450,6 +450,7 @@ class ReplApplication(Cmd, BaseApplication):
"""
backends = kwargs.pop('backends', None)
kwargs['backends'] = self.enabled_backends if backends is None else backends
kwargs['condition'] = self.condition
fields = self.selected_fields
if fields == '$direct':
fields = []
@ -1019,11 +1020,9 @@ class ReplApplication(Cmd, BaseApplication):
if fields in ('$direct', '$full'):
fields = None
try:
self.formatter.format(obj=result, selected_fields=fields, condition=self.condition)
self.formatter.format(obj=result, selected_fields=fields)
except FieldNotFound, e:
print e
except ResultsConditionException, e:
print e
def flush(self):
self.formatter.flush()