From e25389db0dc406d417d8d6b3bea154be8878d554 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Nov 2016 17:55:52 +0100 Subject: [PATCH] Listen on all channels! --- notify.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/notify.py b/notify.py index b4734a2..49a5f4f 100644 --- a/notify.py +++ b/notify.py @@ -18,9 +18,10 @@ def to_nodered(provider, data): ws.close() def wait_for_pkg(conns): - if select.select(conns,[],[]) == ([],[],[]): - print("Select error") - else: + + readable, writable, exceptional = select.select(conns,[],[]) + + for conn in readable: conn.poll() while conn.notifies: notify = conn.notifies.pop(0)