summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/management/commands/lsupdates.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/orm/management/commands/lsupdates.py')
-rw-r--r--bitbake/lib/toaster/orm/management/commands/lsupdates.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/bitbake/lib/toaster/orm/management/commands/lsupdates.py b/bitbake/lib/toaster/orm/management/commands/lsupdates.py
index 5b5abbb295..6d64830ebd 100644
--- a/bitbake/lib/toaster/orm/management/commands/lsupdates.py
+++ b/bitbake/lib/toaster/orm/management/commands/lsupdates.py
@@ -8,7 +8,7 @@
from django.core.management.base import BaseCommand
-from orm.models import LayerSource, Layer, Release, Layer_Version
+from orm.models import Layer, Release, Layer_Version
from orm.models import LayerVersionDependency, Machine, Recipe
from orm.models import Distro
from orm.models import ToasterSetting
@@ -21,7 +21,7 @@ import threading
import time
logger = logging.getLogger("toaster")
-DEFAULT_LAYERINDEX_SERVER = "http://layers.openembedded.org/layerindex/api/"
+DEFAULT_LAYERINDEX_SERVER = "https://layers.openembedded.org/layerindex/api/"
# Add path to bitbake modules for layerindexlib
# lib/toaster/orm/management/commands/lsupdates.py (abspath)
@@ -40,7 +40,7 @@ class Spinner(threading.Thread):
""" A simple progress spinner to indicate download/parsing is happening"""
def __init__(self, *args, **kwargs):
super(Spinner, self).__init__(*args, **kwargs)
- self.setDaemon(True)
+ self.daemon = True
self.signal = True
def run(self):
@@ -68,7 +68,7 @@ class Command(BaseCommand):
(what,
pec))
sys.stdout.flush()
- if int(pec) is 100:
+ if int(pec) == 100:
sys.stdout.write("\n")
sys.stdout.flush()
@@ -87,13 +87,13 @@ class Command(BaseCommand):
# update branches; only those that we already have names listed in the
# Releases table
- whitelist_branch_names = [rel.branch_name
- for rel in Release.objects.all()]
- if len(whitelist_branch_names) == 0:
+ allowed_branch_names = [rel.branch_name
+ for rel in Release.objects.all()]
+ if len(allowed_branch_names) == 0:
raise Exception("Failed to make list of branches to fetch")
logger.info("Fetching metadata for %s",
- " ".join(whitelist_branch_names))
+ " ".join(allowed_branch_names))
# We require a non-empty bb.data, but we can fake it with a dictionary
layerindex = layerindexlib.LayerIndex({"DUMMY" : "VALUE"})
@@ -101,8 +101,8 @@ class Command(BaseCommand):
http_progress = Spinner()
http_progress.start()
- if whitelist_branch_names:
- url_branches = ";branch=%s" % ','.join(whitelist_branch_names)
+ if allowed_branch_names:
+ url_branches = ";branch=%s" % ','.join(allowed_branch_names)
else:
url_branches = ""
layerindex.load_layerindex("%s%s" % (self.apiurl, url_branches))