[gnome-continuous-yocto/gnomeostree-3.28-rocko: 633/8267] bitbake: toaster: fix local imports
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 633/8267] bitbake: toaster: fix local imports
- Date: Sat, 16 Dec 2017 20:42:01 +0000 (UTC)
commit 9a3f2b3912f7f1e671dc48f856a1ee20db23be25
Author: Ed Bartosh <ed bartosh linux intel com>
Date: Tue May 10 15:17:26 2016 +0300
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>
bitbake/lib/toaster/bldcontrol/bbcontroller.py | 2 +-
.../toaster/bldcontrol/localhostbecontroller.py | 2 +-
.../management/commands/checksettings.py | 2 +-
.../bldcontrol/management/commands/loadconf.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
index d09ac17..9bddadb 100644
--- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py
+++ b/bitbake/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/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 7b2f126..b4e4196 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/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/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
index 6b1da1b..2407e1b 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/bitbake/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/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py
b/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py
index 5022b59..6d25df9 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py
+++ b/bitbake/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")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]