[bitbake-devel] Dongxiao Xu : xmlrpc: Change BitbakeServerInfo init function

Submitted by git@git.openembedded.org on Jan. 6, 2012, 4:02 p.m.

Details

Message ID 20120106160257.4389E10335@opal
State Not Applicable
Headers show

Commit Message

git@git.openembedded.org Jan. 6, 2012, 4:02 p.m.
Module: bitbake.git
Branch: master
Commit: 5124351d6c287185723c98e6e4400c5402a5c8a8
URL:    http://git.openembedded.org/?p=bitbake.git&a=commit;h=5124351d6c287185723c98e6e4400c5402a5c8a8

Author: Dongxiao Xu <dongxiao.xu@intel.com>
Date:   Fri Jan  6 17:02:27 2012 +0800

xmlrpc: Change BitbakeServerInfo init function

Pass host and port to BitbakeServerInfo class instead of the "server"
instance. With this change, GUI can connect with server individually
by host address and port.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

---

 lib/bb/server/xmlrpc.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/lib/bb/server/xmlrpc.py b/lib/bb/server/xmlrpc.py
index a7ac969..b5980c6 100644
--- a/lib/bb/server/xmlrpc.py
+++ b/lib/bb/server/xmlrpc.py
@@ -242,9 +242,9 @@  class BitBakeXMLRPCServer(SimpleXMLRPCServer):
         return
 
 class BitbakeServerInfo():
-    def __init__(self, server):
-        self.host = server.host
-        self.port = server.port
+    def __init__(self, host, port):
+        self.host = host
+        self.port = port
 
 class BitBakeServerConnection():
     def __init__(self, serverinfo):
@@ -278,7 +278,7 @@  class BitBakeServer(object):
         return self.server.register_idle_function
 
     def saveConnectionDetails(self): 
-        self.serverinfo = BitbakeServerInfo(self.server)
+        self.serverinfo = BitbakeServerInfo(self.server.host, self.server.port)
 
     def detach(self, cooker_logfile):
         daemonize.createDaemon(self.server.serve_forever, cooker_logfile)