Beispiel #1
0
    def handle_setName(self, name):
        self.log.debug('Setting name to {name}', name=name)

        try:
            yield self._talker.setName(name)
        except ValueError:
            response = {'action': 'setNameFailed'}
        else:
            response = {'action': 'setNameSuccess'}
        self.sendMessage(dumps(response))
Beispiel #2
0
    def handle_setName(self, name):
        self.log.debug('Setting name to {name}', name=name)

        try:
            yield self._talker.setName(name)
        except ValueError:
            response = {'action': 'setNameFailed'}
        else:
            response = {'action': 'setNameSuccess'}
        self.sendMessage(dumps(response))
Beispiel #3
0
    def handle_setName(self, name):
        self.log.debug("Setting name to {name}", name=name)

        try:
            yield self._talker.setName(name)
        except ValueError:
            response = {"action": "setNameFailed"}
        else:
            response = {"action": "setNameSuccess"}
        self.sendMessage(dumps(response))
Beispiel #4
0
 def sendAction(self, payload=None, action=None):
     self.sendMessage(dumps({
         'action': action,
         'payload': payload
     }))
Beispiel #5
0
 def sendAction(self, payload=None, action=None):
     self.sendMessage(dumps({'action': action, 'payload': payload}))
Beispiel #6
0
 def sendAction(self, payload=None, action=None):
     self.sendMessage(dumps({"action": action, "payload": payload}))