summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Foerster <robert@erafx.com>2010-12-18 03:06:57 +0800
committerChris Larson <chris_larson@mentor.com>2010-12-17 12:21:25 -0700
commit33e36916dfda773d92f6b0f2bbbda00cc07f9261 (patch)
tree3a6540048af8e594a75920ce7002738847253767
parent40778a6e9e82c7ea4673a74fc19574430fa63e8d (diff)
downloadbitbake-33e36916dfda773d92f6b0f2bbbda00cc07f9261.tar.gz
Timeout UI runCommand calls if server doesn't respond (or dies)
Signed-off-by: Bob Foerster <robert@erafx.com>
-rw-r--r--lib/bb/server/process.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index dac442292..dd84fdfad 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -43,8 +43,10 @@ class ServerCommunicator():
while True:
# don't let the user ctrl-c while we're waiting for a response
try:
- result = self.connection.recv()
- return result
+ if self.connection.poll(.5):
+ return self.connection.recv()
+ else:
+ return None
except KeyboardInterrupt:
pass