예제 #1
0
파일: server.py 프로젝트: jaunis/xivo-bus
    def _process_next_command(self, request):
        response = CommandResponse()
        try:
            command = self._marshaler.unmarshal_command(request)
            callback = self._commands_callback[command.name]
            response.value = self._call_callback(callback, command)
        except BusCtlServerError as e:
            response.error = e.error
        except Exception:
            logger.error('Error while processing command', exc_info=True)
            response.error = error.SERVER_ERROR

        return self._reply_response(response)
예제 #2
0
파일: server.py 프로젝트: jaunis/xivo-bus
    def _process_next_command(self, request):
        response = CommandResponse()
        try:
            command = self._marshaler.unmarshal_command(request)
            callback = self._commands_callback[command.name]
            response.value = self._call_callback(callback, command)
        except BusCtlServerError as e:
            response.error = e.error
        except Exception:
            logger.error('Error while processing command', exc_info=True)
            response.error = error.SERVER_ERROR

        return self._reply_response(response)