From 606110e647c4c8b0f5e328e5cc255faccca5655f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 5 Jan 2014 08:46:45 +0200 Subject: [PATCH] wpaspy: Add optional timeout argument for pending() This can be used to wait for up to the specified limit on new event messages. Signed-hostap: Jouni Malinen --- wpaspy/wpaspy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpaspy/wpaspy.py b/wpaspy/wpaspy.py index 7c2314dc2..24c371908 100644 --- a/wpaspy/wpaspy.py +++ b/wpaspy/wpaspy.py @@ -70,8 +70,8 @@ class Ctrl: return None raise Exception("DETACH failed") - def pending(self): - [r, w, e] = select.select([self.s], [], [], 0) + def pending(self, timeout=0): + [r, w, e] = select.select([self.s], [], [], timeout) if r: return True return False