- commit
- 047eac9414a40cee8b57c1252c30d0766baf312a
- parent
- 0fa6a17d2f1942d7b2d96e55f11b09a6123d87f5
- Author
- Tobias Bengfort <tobias.bengfort@gmx.net>
- Date
- 2014-10-05 21:46
send empty response by default
Diffstat
| M | laneya/protocol.py | 3 | +++ |
| M | laneya/server.py | 2 | -- |
2 files changed, 3 insertions, 2 deletions
diff --git a/laneya/protocol.py b/laneya/protocol.py
@@ -144,6 +144,9 @@ class ServerProtocol(BaseProtocol): 144 144 log.err(err) 145 145 return self._sendResponse(key, 'internal', message=str(err)) 146 146 -1 147 if response is None: -1 148 response = {} -1 149 147 150 return self._sendResponse(key, 'success', **response) 148 151 149 152 def jsonReceived(self, message):
diff --git a/laneya/server.py b/laneya/server.py
@@ -27,11 +27,9 @@ class Server(protocol.ServerProtocolFactory): 27 27 28 28 if action == 'move': 29 29 self.users[user].direction = kwargs['direction']30 -1 return {}31 30 elif action == 'logout': 32 31 del self.users[user] 33 32 print("logout %s" % user)34 -1 return {}35 33 else: 36 34 raise protocol.InvalidError 37 35