diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-03-06 15:42:03 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-09 14:33:46 +0000 |
commit | 7d9dd125f1207d4b1751763d9fd33d8ed1d74498 (patch) | |
tree | 208c563145bdcb86918be3db02e7857e854f95dc /bitbake/lib | |
parent | b611de9429d94a113cc08103c86877e103ea8de4 (diff) | |
download | poky-7d9dd125f1207d4b1751763d9fd33d8ed1d74498.tar.gz |
bitbake: xmlrpc server: delete function on errors
This patch makes sure to delete an idle function that
raises an exception for the xmlrpc server.
The counterpart functionality in the process server was
added with:
commit db50630948394bdcd361f3511af40c1896b1a017.
duthor: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed Aug 20 22:31:06 2014 +0000
bitbake: process: Deal with infinite looping of the server
This patch fixes
[YOCTO #7316]
(Bitbake rev: e7c9a6788d969c901fd6394416ac3936e62c4c72)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/server/xmlrpc.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py index afe3dfe5df..17f3d9d906 100644 --- a/bitbake/lib/bb/server/xmlrpc.py +++ b/bitbake/lib/bb/server/xmlrpc.py | |||
@@ -235,6 +235,7 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer): | |||
235 | fds = [self] | 235 | fds = [self] |
236 | nextsleep = 0.1 | 236 | nextsleep = 0.1 |
237 | for function, data in self._idlefuns.items(): | 237 | for function, data in self._idlefuns.items(): |
238 | retval = None | ||
238 | try: | 239 | try: |
239 | retval = function(self, data, False) | 240 | retval = function(self, data, False) |
240 | if retval is False: | 241 | if retval is False: |
@@ -248,6 +249,9 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer): | |||
248 | except: | 249 | except: |
249 | import traceback | 250 | import traceback |
250 | traceback.print_exc() | 251 | traceback.print_exc() |
252 | if retval == None: | ||
253 | # the function execute failed; delete it | ||
254 | del self._idlefuns[function] | ||
251 | pass | 255 | pass |
252 | 256 | ||
253 | socktimeout = self.socket.gettimeout() or nextsleep | 257 | socktimeout = self.socket.gettimeout() or nextsleep |