[bitbake-devel] [PATCH 12/14] bitbake: toaster logger: fix pylint issues
Olof Johansson
olof.johansson at axis.com
Thu Aug 20 12:55:12 UTC 2015
Excerpts from Michael Wood's message of 2015-08-18 18:28:58 +0200:
> From: Alexandru DAMIAN <alexandru.damian at intel.com>
>
> This patch fixes pylint issues in the toaster build data logger,
> toasterui. The following types of warnings are touched here:
>
> * fixing imports
> * unused variables are set to _
> * logger calls now use lazy evaluation instead of formatting
> the string
> * correct whitespace identation
> * removes unneeded "pass" statements, and extra parantheses
> * disable specific pylint warnings when decideing to override
> them
This change causes the following RuntimeError exception, when running bitbake
(any bitbake command):
$ python --version
Python 2.7.9
$ bitbake
Traceback (most recent call last):
File ".../poky/bitbake/bin/bitbake", line 44, in <module>
sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
File ".../poky/bitbake/lib/bb/cookerdata.py", line 37, in __init__
self.options, targets = self.parseCommandLine(argv)
File ".../poky/bitbake/lib/bb/main.py", line 178, in parseCommandLine
valid_uis = list_extension_modules(bb.ui, 'main')
File ".../poky/bitbake/lib/bb/main.py", line 62, in list_extension_modules
module = __import__(pkg.__name__, fromlist=[modulename])
File ".../poky/bitbake/lib/bb/ui/buildinfohelper.py", line 44, in <module>
from bldcontrol.models import BuildEnvironment, BuildRequest
File ".../poky/bitbake/lib/toaster/bldcontrol/models.py", line 3, in <module>
from orm.models import Project, ProjectLayer, ProjectVariable, ProjectTarget, Build
File ".../poky/bitbake/lib/toaster/orm/models.py", line 56, in <module>
class ToasterSetting(models.Model):
File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 283, in __new__
new_class._meta.apps.register_model(new_class._meta.app_label, new_class)
File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 221, in register_model
(model_name, app_label, app_models[model_name], model))
RuntimeError: Conflicting 'toastersetting' models in application 'orm': <class 'toaster.orm.models.ToasterSetting'> and <class 'orm.models.ToasterSetting'>.
Even though .../poky/bitbake/lib is already in the sys.path,
.../poky/bitbake/lib/toaster is also added, which seem to be the cause of this
issue.
I'm a bit surprised that this kind of change causes issues for use of bitbake
not related to toaster.
--
olof johansson
More information about the bitbake-devel
mailing list