aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/bldcontrol/management/commands/runbuilds.py
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2017-06-27 13:44:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-27 22:17:53 +0100
commite4c7a94fac7a53fc146387a57e5a09b9ec3caca0 (patch)
treecffd5606db9cc2e155498348b908ce01099356f9 /lib/toaster/bldcontrol/management/commands/runbuilds.py
parent22cc318be1aff16f1b653ff0650fe71d0e9f60bb (diff)
downloadbitbake-e4c7a94fac7a53fc146387a57e5a09b9ec3caca0.tar.gz
toaster: address Django-1.10 API deprecations
There are four main API deprecations in Django-1.10: (a) String view arguments to url() must be replaced by the explicit class reference (b) New TEMPLATES stucture in settings.py consolidates TEMPLATE_DIRS, TEMPLATE_CONTEXT_PROCESSORS, TEMPLATE_LOADERS, TEMPLATE_STRING_IF_INVALID, and TEMPLATE_DEBUG (c) patterns() wrapper in url() is removed, with urlpatterns now a simple list (d) NoArgsCommand in commands() must be replace by BaseCommand, and handle_noargs() changed to handle() Also, the Django version checker must be updated to accept two digit sub-version numbers (e.g. "1.8" < "1.10") [YOCTO #11684] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/bldcontrol/management/commands/runbuilds.py')
-rw-r--r--lib/toaster/bldcontrol/management/commands/runbuilds.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/toaster/bldcontrol/management/commands/runbuilds.py b/lib/toaster/bldcontrol/management/commands/runbuilds.py
index df11f9d16..8eacb5e89 100644
--- a/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -1,4 +1,4 @@
-from django.core.management.base import NoArgsCommand
+from django.core.management.base import BaseCommand
from django.db import transaction
from django.db.models import Q
@@ -16,7 +16,7 @@ import os
logger = logging.getLogger("toaster")
-class Command(NoArgsCommand):
+class Command(BaseCommand):
args = ""
help = "Schedules and executes build requests as possible. "\
"Does not return (interrupt with Ctrl-C)"
@@ -168,7 +168,7 @@ class Command(NoArgsCommand):
except Exception as e:
logger.warn("runbuilds: schedule exception %s" % str(e))
- def handle_noargs(self, **options):
+ def handle(self, **options):
pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."),
".runbuilds.pid")