Peers logic error fix, dummy pipe for sensor

This commit is contained in:
Philip Trauner 2016-12-07 19:12:35 +01:00
parent 160f731281
commit 1980d1c06d

View file

@ -109,8 +109,8 @@ class Peers(Route):
if "channel" in data:
check_type = True
# We can use the in keyword this way
if type(data["channel"]) is int:
data["channel"] = (data["channel"], )
if type(data["channel"]) is int:
data["channel"] = (data["channel"], )
peers = handler.peers
for peer_id in peers:
# Only check for type inclusion if check_type is True
@ -186,7 +186,8 @@ server.set_app(WebSocketWSGIApplication(handler_cls=Handler,
"subscribe" : Subscribe(),
"hostname" : DummyPipe(),
"processes" : DummyPipe(),
"peers" : Peers()}}))
"peers" : Peers(),
"sensor" : DummyPipe()}}))
try: