aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/server
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-05 15:45:37 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-05 17:59:13 +0000
commit4429871da76d6bd29e023ff42740fe7daa6b40fa (patch)
treec8f9b91543f50b45248a9e66de151f7b46669024 /lib/bb/server
parent4e1e497c8432536b3522295e5b1284844ccea056 (diff)
downloadbitbake-contrib-4429871da76d6bd29e023ff42740fe7daa6b40fa.tar.gz
xmplrpc: split connect method
Current code in connect method sets up event queue, which requires registering UI handler. This functionality may not be needed for some operations, e.g. for server termination. Moved functionality of setting up event queue in from 'connect' method to 'setupEventQueue' in BitBakeXMLRPCServerConnection class. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/server')
-rw-r--r--lib/bb/server/__init__.py3
-rw-r--r--lib/bb/server/xmlrpc.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/server/__init__.py b/lib/bb/server/__init__.py
index da5e48074..538a633fe 100644
--- a/lib/bb/server/__init__.py
+++ b/lib/bb/server/__init__.py
@@ -63,6 +63,9 @@ class BitBakeBaseServerConnection():
def terminate(self):
pass
+ def setupEventQueue(self):
+ pass
+
""" BitBakeBaseServer class is the common ancestor to all Bitbake servers
diff --git a/lib/bb/server/xmlrpc.py b/lib/bb/server/xmlrpc.py
index 17eb28b7d..1ceca51e0 100644
--- a/lib/bb/server/xmlrpc.py
+++ b/lib/bb/server/xmlrpc.py
@@ -302,7 +302,9 @@ class BitBakeXMLRPCServerConnection(BitBakeBaseServerConnection):
return None
self.transport.set_connection_token(token)
+ return self
+ def setupEventQueue(self):
self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
for event in bb.event.ui_queue:
self.events.queue_event(event)
@@ -314,8 +316,6 @@ class BitBakeXMLRPCServerConnection(BitBakeBaseServerConnection):
# no need to log it here, the error shall be sent to the client
raise BaseException(error)
- return self
-
def removeClient(self):
if not self.observer_only:
self.connection.removeClient()