[bitbake-devel] [PATCH 02/14] bitbake: toaster: checksettings: fix guesspath initialization
Michael Wood
michael.g.wood at intel.com
Tue Aug 18 16:28:48 UTC 2015
From: Alexandru DAMIAN <alexandru.damian at intel.com>
Object fields need to be instantiated in the constructor.
Fixed prompted by pylint.
Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
lib/toaster/bldcontrol/management/commands/checksettings.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/toaster/bldcontrol/management/commands/checksettings.py b/lib/toaster/bldcontrol/management/commands/checksettings.py
index 508335f..2978db2 100644
--- a/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -17,6 +17,9 @@ class Command(NoArgsCommand):
args = ""
help = "Verifies that the configured settings are valid and usable, or prompts the user to fix the settings."
+ def __init__(self, *args, **kwargs):
+ super(Command, self).__init__(*args, **kwargs)
+ self.guesspath = DN(DN(DN(DN(DN(DN(DN(__file__)))))))
def _find_first_path_for_file(self, startdirectory, filename, level = 0):
if level < 0:
@@ -83,7 +86,6 @@ class Command(NoArgsCommand):
def _verify_build_environment(self):
- self.guesspath = DN(DN(DN(DN(DN(DN(DN(__file__)))))))
# refuse to start if we have no build environments
while BuildEnvironment.objects.count() == 0:
print(" !! No build environments found. Toaster needs at least one build environment in order to be able to run builds.\n" +
--
2.1.4
More information about the bitbake-devel
mailing list