Use class attributes as much as possible for application output

refs #803
This commit is contained in:
Laurent Bachelier 2014-09-03 01:22:18 +02:00
commit c07e23cafc
35 changed files with 228 additions and 260 deletions

View file

@ -23,7 +23,6 @@ from weboob.capabilities.gauge import CapGauge, SensorNotFound
from weboob.tools.application.repl import ReplApplication
from weboob.tools.application.formatters.iformatter import IFormatter
import sys
__all__ = ['Boobsize']
@ -111,7 +110,7 @@ class Boobsize(ReplApplication):
def bcall_error_handler(self, backend, error, backtrace):
if isinstance(error, SensorNotFound):
msg = unicode(error) or 'Sensor not found (hint: try details command)'
print >>sys.stderr, 'Error(%s): %s' % (backend.name, msg)
print >>self.stderr, 'Error(%s): %s' % (backend.name, msg)
else:
return ReplApplication.bcall_error_handler(self, backend, error, backtrace)