Esempio n. 1
0
 def bcall_error_handler(self, backend, error, backtrace):
     if isinstance(error, SensorNotFound):
         msg = unicode(
             error) or 'Sensor not found (hint: try details command)'
         print('Error(%s): %s' % (backend.name, msg), file=self.stderr)
     else:
         return ReplApplication.bcall_error_handler(self, backend, error,
                                                    backtrace)
Esempio n. 2
0
 def bcall_error_handler(self, backend, error, backtrace):
     if isinstance(error, TransferStep):
         params = {}
         for field in error.fields:
             v = self.ask(field)
             if v:
                 params[field.id] = v
         #backend.config['accept_transfer'].set(v)
         params['backends'] = backend
         self.start_format()
         for transfer in self.do('transfer', error.transfer, **params):
             self.format(transfer)
     elif isinstance(error, AddRecipientStep):
         params = {}
         params['backends'] = backend
         for field in error.fields:
             v = self.ask(field)
             if v:
                 params[field.id] = v
         next(iter(self.do('add_recipient', error.recipient, **params)))
     else:
         return ReplApplication.bcall_error_handler(self, backend, error,
                                                    backtrace)
Esempio n. 3
0
 def bcall_error_handler(self, backend, error, backtrace):
     if isinstance(error, SensorNotFound):
         msg = unicode(error) or 'Sensor not found (hint: try details command)'
         print('Error(%s): %s' % (backend.name, msg), file=self.stderr)
     else:
         return ReplApplication.bcall_error_handler(self, backend, error, backtrace)