summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/server
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-11-28 15:01:08 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-11-28 13:54:31 -0800
commitd4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8 (patch)
treefc42e4f4518015a160edfa88f23ef699839171e2 /bitbake/lib/bb/server
parentc0202071428fde6ef0a93de9c99d416624628813 (diff)
downloadopenembedded-core-d4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8.tar.gz
openembedded-core-d4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8.tar.bz2
openembedded-core-d4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8.tar.xz
openembedded-core-d4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8.zip
bitbake: Simplfy pre and post cooker hooks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r--bitbake/lib/bb/server/none.py9
-rw-r--r--bitbake/lib/bb/server/xmlrpc.py7
2 files changed, 3 insertions, 13 deletions
diff --git a/bitbake/lib/bb/server/none.py b/bitbake/lib/bb/server/none.py
index 38f713c51..dafb2feba 100644
--- a/bitbake/lib/bb/server/none.py
+++ b/bitbake/lib/bb/server/none.py
@@ -109,11 +109,9 @@ class BitBakeServer():
# remove this when you're done with debugging
# allow_reuse_address = True
- def __init__(self, cooker, pre_serve, post_serve):
+ def __init__(self, cooker):
self._idlefuns = {}
self.commands = BitBakeServerCommands(self, cooker)
- self.pre_serve = pre_serve
- self.post_serve = post_serve
def register_idle_function(self, function, data):
"""Register a function to be called while the server is idle"""
@@ -169,10 +167,7 @@ class BitBakeServerFork():
class BitbakeUILauch():
def launch(self, serverinfo, uifunc, *args):
- serverinfo.server.pre_serve()
- ret = bb.cooker.server_main(serverinfo.cooker, uifunc, *args)
- serverinfo.server.post_serve()
- return ret
+ return bb.cooker.server_main(serverinfo.cooker, uifunc, *args)
class BitBakeServerConnection():
def __init__(self, serverinfo):
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py
index 30b83d2b1..5d3cc3e10 100644
--- a/bitbake/lib/bb/server/xmlrpc.py
+++ b/bitbake/lib/bb/server/xmlrpc.py
@@ -87,7 +87,7 @@ class BitBakeServer(SimpleXMLRPCServer):
# remove this when you're done with debugging
# allow_reuse_address = True
- def __init__(self, cooker, pre_serve, post_serve, interface = ("localhost", 0)):
+ def __init__(self, cooker, interface = ("localhost", 0)):
"""
Constructor
"""
@@ -100,8 +100,6 @@ class BitBakeServer(SimpleXMLRPCServer):
commands = BitBakeServerCommands(self, cooker)
self.autoregister_all_functions(commands, "")
self.cooker = cooker
- self.pre_serve = pre_serve
- self.post_serve = post_serve
def autoregister_all_functions(self, context, prefix):
"""
@@ -125,8 +123,6 @@ class BitBakeServer(SimpleXMLRPCServer):
"""
Serve Requests. Overloaded to honor a quit command
"""
- self.pre_serve()
-
self.quit = False
self.timeout = 0 # Run Idle calls for our first callback
while not self.quit:
@@ -163,7 +159,6 @@ class BitBakeServer(SimpleXMLRPCServer):
except:
pass
- self.post_serve()
self.server_close()
return