diff options
Diffstat (limited to 'bitbake-dev/lib/bb/ui/uievent.py')
-rw-r--r-- | bitbake-dev/lib/bb/ui/uievent.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bitbake-dev/lib/bb/ui/uievent.py b/bitbake-dev/lib/bb/ui/uievent.py index 9d724d7fc5..23fdd0f961 100644 --- a/bitbake-dev/lib/bb/ui/uievent.py +++ b/bitbake-dev/lib/bb/ui/uievent.py @@ -24,7 +24,7 @@ server and queue them for the UI to process. This process must be used to avoid client/server deadlocks. """ -import sys, socket, threading +import socket, threading from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler class BBUIEventQueue: @@ -37,8 +37,8 @@ class BBUIEventQueue: self.BBServer = BBServer self.t = threading.Thread() - self.t.setDaemon(True)
- self.t.run = self.startCallbackHandler
+ self.t.setDaemon(True) + self.t.run = self.startCallbackHandler self.t.start() def getEvent(self): @@ -72,7 +72,7 @@ class BBUIEventQueue: def startCallbackHandler(self): server = UIXMLRPCServer() - self.host, self.port = server.socket.getsockname()
+ self.host, self.port = server.socket.getsockname() server.register_function( self.system_quit, "event.quit" ) server.register_function( self.queue_event, "event.send" ) @@ -85,7 +85,7 @@ class BBUIEventQueue: server.handle_request() server.server_close() - def system_quit( self ):
+ def system_quit( self ): """ Shut down the callback thread """ @@ -97,11 +97,11 @@ class BBUIEventQueue: class UIXMLRPCServer (SimpleXMLRPCServer): - def __init__( self, interface = ("localhost", 0) ):
+ def __init__( self, interface = ("localhost", 0) ): self.quit = False - SimpleXMLRPCServer.__init__( self,
- interface,
- requestHandler=SimpleXMLRPCRequestHandler,
+ SimpleXMLRPCServer.__init__( self, + interface, + requestHandler=SimpleXMLRPCRequestHandler, logRequests=False, allow_none=True) def get_request(self): @@ -123,5 +123,5 @@ class UIXMLRPCServer (SimpleXMLRPCServer): if request is None: return SimpleXMLRPCServer.process_request(self, request, client_address) -
+ |