summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-08-18 17:28:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-19 18:03:41 +0100
commit40db75c6117c3226c27d278d2acf0cd3ba61a167 (patch)
tree095b999290b07967826f53a8ae405e4e60220d3e
parent066e096b80dcb0e93e1a088acf5d914184361769 (diff)
toaster: checksettings: fix guesspath initialization
Object fields need to be instantiated in the constructor. Fixed prompted by pylint. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/toaster/bldcontrol/management/commands/checksettings.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/toaster/bldcontrol/management/commands/checksettings.py b/lib/toaster/bldcontrol/management/commands/checksettings.py
index 508335f4..2978db23 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" +