From: Ondrej Lichtner <olichtne(a)redhat.com>
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>
---
lnst/Common/ConnectionHandler.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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)
--
1.8.3.1