bitbake: toaster: fix local imports

Replaced local imports with absolute imports.
Used .module for local imports.

This should make the code to work on python 2 and python 3.

[YOCTO #9584]

(Bitbake rev: 3f1e68c783308dcb51242d0fdeef758e581ccc8c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh 2016-05-10 15:17:26 +03:00 committed by Richard Purdie
parent 0224f75999
commit 9a3f2b3912
4 changed files with 4 additions and 4 deletions

View File

@ -79,7 +79,7 @@ def getBuildEnvironmentController(**kwargs):
The return object MUST always be a BuildEnvironmentController.
"""
from localhostbecontroller import LocalhostBEController
from bldcontrol.localhostbecontroller import LocalhostBEController
be = BuildEnvironment.objects.filter(Q(**kwargs))[0]
if be.betype == BuildEnvironment.TYPE_LOCAL:

View File

@ -32,7 +32,7 @@ import subprocess
from toastermain import settings
from bbcontroller import BuildEnvironmentController, ShellCmdException, BuildSetupException, BitbakeController
from bldcontrol.bbcontroller import BuildEnvironmentController, ShellCmdException, BuildSetupException, BitbakeController
import logging
logger = logging.getLogger("toaster")

View File

@ -105,7 +105,7 @@ class Command(NoArgsCommand):
try:
config_file = os.environ.get('TOASTER_CONF')
print("\nImporting file: %s" % config_file)
from loadconf import Command as LoadConfigCommand
from .loadconf import Command as LoadConfigCommand
LoadConfigCommand()._import_layer_config(config_file)
# we run lsupdates after config update

View File

@ -4,7 +4,7 @@ from orm.models import BitbakeVersion, Release, ReleaseDefaultLayer, ReleaseLaye
from django.db import IntegrityError
import os
from checksettings import DN
from .checksettings import DN
import logging
logger = logging.getLogger("toaster")