rdv_ws: avoid magic method-name concatenation
This commit is contained in:
parent
a086effd52
commit
58e95cff0d
|
@ -87,10 +87,14 @@ class WebSocketRendezvous(websocket.WebSocketServerProtocol):
|
||||||
|
|
||||||
if not self._channel:
|
if not self._channel:
|
||||||
raise Error("Must set channel first")
|
raise Error("Must set channel first")
|
||||||
meth = getattr(self, "handle_"+mtype, None)
|
if mtype == "watch":
|
||||||
if not meth:
|
return self.handle_watch(self._channel, msg)
|
||||||
|
if mtype == "add":
|
||||||
|
return self.handle_add(self._channel, msg)
|
||||||
|
if mtype == "deallocate":
|
||||||
|
return self.handle_deallocate(self._channel, msg)
|
||||||
|
|
||||||
raise Error("Unknown type")
|
raise Error("Unknown type")
|
||||||
return meth(self._channel, msg)
|
|
||||||
except Error as e:
|
except Error as e:
|
||||||
self.send("error", error=e._explain, orig=msg)
|
self.send("error", error=e._explain, orig=msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user