Moved import xmlrpc module to the place where it's used
to avoid toaster crashes when importing bitbake code.
NOTE: This patch is made to be able to partly test toaster
with bitbake from master. It can be removed as soon as bb.server.xmlrpc
is ported to python 3.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
# load Bitbake components
path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
sys.path.insert(0, path)
-import bb.server.xmlrpc
class BitbakeController(object):
""" This is the basic class that controlls a bitbake server.
"""
def __init__(self, be):
+ import bb.server.xmlrpc
self.connection = bb.server.xmlrpc._create_server(be.bbaddress,
int(be.bbport))[0]