commit 95e770593cd247d1ce284871262d00b82ffe5a48
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Fri Jul 26 12:59:45 2013 +0200
ConnectionHandler: add handling of select exceptions
When slave was in a select call and a keyboard interrupt was recieved it
cased the slave to crash with an exception. This commit fixes that.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Common/ConnectionHandler.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Common/ConnectionHandler.py b/lnst/Common/ConnectionHandler.py
index 8e9e548..80a9538 100644
--- a/lnst/Common/ConnectionHandler.py
+++ b/lnst/Common/ConnectionHandler.py
@@ -67,7 +67,10 @@ class ConnectionHandler(object):
def check_connections(self):
requests = []
- rl, wl, xl = select.select(self._connections.values(), [], [])
+ try:
+ rl, wl, xl = select.select(self._connections.values(), [], [])
+ except select.error:
+ return []
for f in rl:
try:
data = recv_data(f)
Show replies by date