summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm
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-28 16:02:15 +0100
commitd74bcbeaf241a67871d62b7e2c17900ae900642e (patch)
treebd0bf6037a0de26e7668f146ec6ff4afde07e54f /bitbake/lib/toaster/orm
parentc3058ec4a4f2f4c57116816a5bede1e61a5a4cc4 (diff)
downloadpoky-d74bcbeaf241a67871d62b7e2c17900ae900642e.tar.gz
bitbake: 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] (Bitbake rev: e4c7a94fac7a53fc146387a57e5a09b9ec3caca0) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/orm')
-rw-r--r--bitbake/lib/toaster/orm/management/commands/lsupdates.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/orm/management/commands/lsupdates.py b/bitbake/lib/toaster/orm/management/commands/lsupdates.py
index 68c6c423d8..90f07c9dc5 100644
--- a/bitbake/lib/toaster/orm/management/commands/lsupdates.py
+++ b/bitbake/lib/toaster/orm/management/commands/lsupdates.py
@@ -4,7 +4,7 @@
4# 4#
5# BitBake Toaster Implementation 5# BitBake Toaster Implementation
6# 6#
7# Copyright (C) 2016 Intel Corporation 7# Copyright (C) 2016-2017 Intel Corporation
8# 8#
9# This program is free software; you can redistribute it and/or modify 9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License version 2 as 10# it under the terms of the GNU General Public License version 2 as
@@ -19,7 +19,7 @@
19# with this program; if not, write to the Free Software Foundation, Inc., 19# with this program; if not, write to the Free Software Foundation, Inc.,
20# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 21
22from django.core.management.base import NoArgsCommand 22from django.core.management.base import BaseCommand
23 23
24from orm.models import LayerSource, Layer, Release, Layer_Version 24from orm.models import LayerSource, Layer, Release, Layer_Version
25from orm.models import LayerVersionDependency, Machine, Recipe 25from orm.models import LayerVersionDependency, Machine, Recipe
@@ -56,7 +56,7 @@ class Spinner(threading.Thread):
56 self.signal = False 56 self.signal = False
57 57
58 58
59class Command(NoArgsCommand): 59class Command(BaseCommand):
60 args = "" 60 args = ""
61 help = "Updates locally cached information from a layerindex server" 61 help = "Updates locally cached information from a layerindex server"
62 62
@@ -307,5 +307,5 @@ class Command(NoArgsCommand):
307 307
308 os.system('setterm -cursor on') 308 os.system('setterm -cursor on')
309 309
310 def handle_noargs(self, **options): 310 def handle(self, **options):
311 self.update() 311 self.update()