diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-14 16:22:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-14 17:26:21 +0100 |
commit | a51c402304f2080a76720f9b31d6dfdbed393bba (patch) | |
tree | 892d466911437dfd0fc53e193b57c609d1e26a7b /lib/bb/server/process.py | |
parent | c54e738e2b5dc0d8e6fd8e93b284ed96e7a83051 (diff) | |
download | bitbake-a51c402304f2080a76720f9b31d6dfdbed393bba.tar.gz |
compat/server/utils: Jettison pre python 2.7.3 workarounds
Now we've moved to require python 2.7.3, we can jettison the compatibility
workarounds/hacks for older python versions.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/server/process.py')
-rw-r--r-- | lib/bb/server/process.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py index d73fe827e..0d4a26ced 100644 --- a/lib/bb/server/process.py +++ b/lib/bb/server/process.py @@ -142,52 +142,6 @@ class ProcessServer(Process, BaseImplServer): def stop(self): self.keep_running.clear() - def bootstrap_2_6_6(self): - """Pulled from python 2.6.6. Needed to ensure we have the fix from - http://bugs.python.org/issue5313 when running on python version 2.6.2 - or lower.""" - - try: - self._children = set() - self._counter = itertools.count(1) - try: - sys.stdin.close() - sys.stdin = open(os.devnull) - except (OSError, ValueError): - pass - multiprocessing._current_process = self - util._finalizer_registry.clear() - util._run_after_forkers() - util.info('child process calling self.run()') - try: - self.run() - exitcode = 0 - finally: - util._exit_function() - except SystemExit as e: - if not e.args: - exitcode = 1 - elif type(e.args[0]) is int: - exitcode = e.args[0] - else: - sys.stderr.write(e.args[0] + '\n') - sys.stderr.flush() - exitcode = 1 - except: - exitcode = 1 - import traceback - sys.stderr.write('Process %s:\n' % self.name) - sys.stderr.flush() - traceback.print_exc() - - util.info('process exiting with exitcode %d' % exitcode) - return exitcode - - # Python versions 2.6.0 through 2.6.2 suffer from a multiprocessing bug - # which can result in a bitbake server hang during the parsing process - if (2, 6, 0) <= sys.version_info < (2, 6, 3): - _bootstrap = bootstrap_2_6_6 - class BitBakeProcessServerConnection(BitBakeBaseServerConnection): def __init__(self, serverImpl, ui_channel, event_queue): self.procserver = serverImpl |