aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-01-05 06:46:45 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-07 08:45:10 (GMT)
commit606110e647c4c8b0f5e328e5cc255faccca5655f (patch)
tree39059b30e879149a0a70802ec72326d6ecda9042
parentadf277a007473f4b4bda7dc1c6eab619b7768ccb (diff)
downloadhostap-606110e647c4c8b0f5e328e5cc255faccca5655f.zip
hostap-606110e647c4c8b0f5e328e5cc255faccca5655f.tar.gz
hostap-606110e647c4c8b0f5e328e5cc255faccca5655f.tar.bz2
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 <j@w1.fi>
-rw-r--r--wpaspy/wpaspy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpaspy/wpaspy.py b/wpaspy/wpaspy.py
index 7c2314d..24c3719 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