diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-11-28 15:01:08 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-11-28 13:54:31 -0800 |
commit | d4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8 (patch) | |
tree | fc42e4f4518015a160edfa88f23ef699839171e2 /bitbake/lib/bb/server | |
parent | c0202071428fde6ef0a93de9c99d416624628813 (diff) | |
download | poky-d4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8.tar.gz |
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.py | 9 | ||||
-rw-r--r-- | bitbake/lib/bb/server/xmlrpc.py | 7 |
2 files changed, 3 insertions, 13 deletions
diff --git a/bitbake/lib/bb/server/none.py b/bitbake/lib/bb/server/none.py index 38f713c519..dafb2feba9 100644 --- a/bitbake/lib/bb/server/none.py +++ b/bitbake/lib/bb/server/none.py | |||
@@ -109,11 +109,9 @@ class BitBakeServer(): | |||
109 | # remove this when you're done with debugging | 109 | # remove this when you're done with debugging |
110 | # allow_reuse_address = True | 110 | # allow_reuse_address = True |
111 | 111 | ||
112 | def __init__(self, cooker, pre_serve, post_serve): | 112 | def __init__(self, cooker): |
113 | self._idlefuns = {} | 113 | self._idlefuns = {} |
114 | self.commands = BitBakeServerCommands(self, cooker) | 114 | self.commands = BitBakeServerCommands(self, cooker) |
115 | self.pre_serve = pre_serve | ||
116 | self.post_serve = post_serve | ||
117 | 115 | ||
118 | def register_idle_function(self, function, data): | 116 | def register_idle_function(self, function, data): |
119 | """Register a function to be called while the server is idle""" | 117 | """Register a function to be called while the server is idle""" |
@@ -169,10 +167,7 @@ class BitBakeServerFork(): | |||
169 | 167 | ||
170 | class BitbakeUILauch(): | 168 | class BitbakeUILauch(): |
171 | def launch(self, serverinfo, uifunc, *args): | 169 | def launch(self, serverinfo, uifunc, *args): |
172 | serverinfo.server.pre_serve() | 170 | return bb.cooker.server_main(serverinfo.cooker, uifunc, *args) |
173 | ret = bb.cooker.server_main(serverinfo.cooker, uifunc, *args) | ||
174 | serverinfo.server.post_serve() | ||
175 | return ret | ||
176 | 171 | ||
177 | class BitBakeServerConnection(): | 172 | class BitBakeServerConnection(): |
178 | def __init__(self, serverinfo): | 173 | def __init__(self, serverinfo): |
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py index 30b83d2b13..5d3cc3e106 100644 --- a/bitbake/lib/bb/server/xmlrpc.py +++ b/bitbake/lib/bb/server/xmlrpc.py | |||
@@ -87,7 +87,7 @@ class BitBakeServer(SimpleXMLRPCServer): | |||
87 | # remove this when you're done with debugging | 87 | # remove this when you're done with debugging |
88 | # allow_reuse_address = True | 88 | # allow_reuse_address = True |
89 | 89 | ||
90 | def __init__(self, cooker, pre_serve, post_serve, interface = ("localhost", 0)): | 90 | def __init__(self, cooker, interface = ("localhost", 0)): |
91 | """ | 91 | """ |
92 | Constructor | 92 | Constructor |
93 | """ | 93 | """ |
@@ -100,8 +100,6 @@ class BitBakeServer(SimpleXMLRPCServer): | |||
100 | commands = BitBakeServerCommands(self, cooker) | 100 | commands = BitBakeServerCommands(self, cooker) |
101 | self.autoregister_all_functions(commands, "") | 101 | self.autoregister_all_functions(commands, "") |
102 | self.cooker = cooker | 102 | self.cooker = cooker |
103 | self.pre_serve = pre_serve | ||
104 | self.post_serve = post_serve | ||
105 | 103 | ||
106 | def autoregister_all_functions(self, context, prefix): | 104 | def autoregister_all_functions(self, context, prefix): |
107 | """ | 105 | """ |
@@ -125,8 +123,6 @@ class BitBakeServer(SimpleXMLRPCServer): | |||
125 | """ | 123 | """ |
126 | Serve Requests. Overloaded to honor a quit command | 124 | Serve Requests. Overloaded to honor a quit command |
127 | """ | 125 | """ |
128 | self.pre_serve() | ||
129 | |||
130 | self.quit = False | 126 | self.quit = False |
131 | self.timeout = 0 # Run Idle calls for our first callback | 127 | self.timeout = 0 # Run Idle calls for our first callback |
132 | while not self.quit: | 128 | while not self.quit: |
@@ -163,7 +159,6 @@ class BitBakeServer(SimpleXMLRPCServer): | |||
163 | except: | 159 | except: |
164 | pass | 160 | pass |
165 | 161 | ||
166 | self.post_serve() | ||
167 | self.server_close() | 162 | self.server_close() |
168 | return | 163 | return |
169 | 164 | ||