]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
Timeout UI runCommand calls if server doesn't respond (or dies)
authorBob Foerster <robert@erafx.com>
Fri, 17 Dec 2010 19:06:57 +0000 (03:06 +0800)
committerChris Larson <chris_larson@mentor.com>
Fri, 17 Dec 2010 19:21:25 +0000 (12:21 -0700)
Signed-off-by: Bob Foerster <robert@erafx.com>
lib/bb/server/process.py

index dac4422921879be6d75928a67d76763996c264ec..dd84fdfaddad8d985fcd3aadacf4f0c98ef599f3 100644 (file)
@@ -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