summaryrefslogtreecommitdiffstats
path: root/external/poky/bitbake/lib/toaster/bldcontrol/management/commands
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/bitbake/lib/toaster/bldcontrol/management/commands')
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py10
-rw-r--r--external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py10
2 files changed, 13 insertions, 7 deletions
diff --git a/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
index 14298d9d..20f9dce5 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -1,8 +1,10 @@
-from django.core.management.base import BaseCommand, CommandError
-from django.db import transaction
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+from django.core.management.base import BaseCommand
from django.core.management import call_command
-from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException
from bldcontrol.models import BuildRequest, BuildEnvironment, BRError
from orm.models import ToasterSetting, Build, Layer
@@ -76,7 +78,7 @@ class Command(BaseCommand):
template_conf = os.environ.get("TEMPLATECONF", "")
custom_xml_only = os.environ.get("CUSTOM_XML_ONLY")
- if ToasterSetting.objects.filter(name='CUSTOM_XML_ONLY').count() > 0 or (not custom_xml_only == None):
+ if ToasterSetting.objects.filter(name='CUSTOM_XML_ONLY').count() > 0 or custom_xml_only is not None:
# only use the custom settings
pass
elif "poky" in template_conf:
diff --git a/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index 6a55dd46..19f659ec 100644
--- a/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/external/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from django.core.management.base import BaseCommand
from django.db import transaction
from django.db.models import Q
@@ -164,17 +168,17 @@ class Command(BaseCommand):
try:
self.cleanup()
except Exception as e:
- logger.warn("runbuilds: cleanup exception %s" % str(e))
+ logger.warning("runbuilds: cleanup exception %s" % str(e))
try:
self.archive()
except Exception as e:
- logger.warn("runbuilds: archive exception %s" % str(e))
+ logger.warning("runbuilds: archive exception %s" % str(e))
try:
self.schedule()
except Exception as e:
- logger.warn("runbuilds: schedule exception %s" % str(e))
+ logger.warning("runbuilds: schedule exception %s" % str(e))
def handle(self, **options):
pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."),