diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-10 15:17:26 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-01 15:28:23 +0100 |
commit | 3f1e68c783308dcb51242d0fdeef758e581ccc8c (patch) | |
tree | 5bcb305227953a2a10353c2678617441679956a5 | |
parent | 1abaa1c6a950b327e6468192dd910549643768bb (diff) | |
download | bitbake-3f1e68c783308dcb51242d0fdeef758e581ccc8c.tar.gz |
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]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/toaster/bldcontrol/bbcontroller.py b/lib/toaster/bldcontrol/bbcontroller.py index d09ac1787..9bddadbf1 100644 --- a/lib/toaster/bldcontrol/bbcontroller.py +++ b/lib/toaster/bldcontrol/bbcontroller.py @@ -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: diff --git a/lib/toaster/bldcontrol/localhostbecontroller.py b/lib/toaster/bldcontrol/localhostbecontroller.py index 7b2f126e9..b4e41968f 100644 --- a/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/lib/toaster/bldcontrol/localhostbecontroller.py @@ -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") diff --git a/lib/toaster/bldcontrol/management/commands/checksettings.py b/lib/toaster/bldcontrol/management/commands/checksettings.py index 6b1da1b10..2407e1bbc 100644 --- a/lib/toaster/bldcontrol/management/commands/checksettings.py +++ b/lib/toaster/bldcontrol/management/commands/checksettings.py @@ -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 diff --git a/lib/toaster/bldcontrol/management/commands/loadconf.py b/lib/toaster/bldcontrol/management/commands/loadconf.py index 5022b5940..6d25df9e5 100644 --- a/lib/toaster/bldcontrol/management/commands/loadconf.py +++ b/lib/toaster/bldcontrol/management/commands/loadconf.py @@ -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") |