Commit 46f29825 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by _Marge_Bot
Browse files
parent f7973476
......@@ -141,8 +141,7 @@ class SchedulerJobsAPI(ExposedV2API):
if job.is_multinode:
return job.multinode_definition
else:
return job.original_definition
return job.original_definition
def list(self, state=None, health=None, start=0, limit=25, since=0, verbose=False):
"""
......
......@@ -86,7 +86,6 @@ class ExpandedStatusColumn(tables.Column):
device is Reserved or Running. Logs error if reserved or running
with no current job.
"""
logger = logging.getLogger("lava_scheduler_app")
if record.state == Device.STATE_RUNNING:
current_job = record.current_job()
return mark_safe( # nosec - internal data
......
......@@ -60,7 +60,7 @@ def replace_dots(string):
return string.replace(".", "-")
@register.simple_tag()
@register.simple_tag
def assign_setting(value):
"""Returns the value of the setting"""
if hasattr(settings, value):
......@@ -84,7 +84,7 @@ def _get_pipeline_data(pipeline, levels):
_get_pipeline_data(action["pipeline"], levels)
@register.simple_tag()
@register.simple_tag
def get_pipeline_sections(pipeline):
"""
Just a top level view of the pipeline sections
......@@ -96,7 +96,7 @@ def get_pipeline_sections(pipeline):
return sections
@register.simple_tag()
@register.simple_tag
def get_pipeline_levels(pipeline):
"""
Retrieve the full set of action levels in this pipeline.
......@@ -117,7 +117,7 @@ def deploy_methods(device_type, methods):
return [methods]
@register.simple_tag()
@register.simple_tag
def device_type_timeouts(device_type):
data = load_devicetype_template(device_type)
if not data or "timeouts" not in data:
......
......@@ -22,12 +22,8 @@ import contextlib
import copy
import errno
import ldap
import logging
import os
import subprocess # nosec verified
import yaml
from collections import OrderedDict
from django.contrib.sites.models import Site
from django.conf import settings
......
......@@ -2391,7 +2391,7 @@ def similar_jobs(request, pk):
job_field_value = dict(field_obj.choices)[job_field_value]
except FieldDoesNotExist:
logger.info("Test job does not contain field '%s'." % fields[key])
logger.info("Test job does not contain field '%s'.", fields[key])
continue
# Handle Foreign key values and dates
......@@ -2417,8 +2417,8 @@ def similar_jobs(request, pk):
except NamedTestAttribute.DoesNotExist:
# Ignore this condition.
logger.info(
"Named attribute %s does not exist for similar jobs search."
% fields[key]
"Named attribute %s does not exist for similar jobs search.",
fields[key],
)
continue
......
......@@ -61,7 +61,7 @@ class Command(BaseCommand):
show_parser.add_argument("hostname", help="Hostname of the device")
# "list" sub-command
list_parser = sub.add_parser("list", help="List all device tag(s)")
sub.add_parser("list", help="List all device tag(s)")
# "remove" sub-command
remove_parser = sub.add_parser(
......
......@@ -37,7 +37,7 @@ from lava_server.cmdutils import LAVADaemonCommand, watch_directory
from lava_scheduler_app.models import TestJob
from lava_scheduler_app.signals import send_event
from lava_scheduler_app.utils import mkdir
from lava_scheduler_app.logutils import line_count, read_logs, write_logs
from lava_scheduler_app.logutils import line_count, write_logs
from lava_results_app.dbutils import map_scanned_results, create_metadata_store
......
......@@ -118,7 +118,7 @@ def main():
device = "/dev/%s" % options.device_node
if not os.path.exists(device):
logger.debug("Skipping node not in /dev/ : %s" % options.device_node)
logger.debug("Skipping node not in /dev/ : %s", options.device_node)
syslog.syslog(
"[%s] Skipping node not in /dev/ : %s"
% (options.job_id, options.device_node)
......
......@@ -25,16 +25,13 @@ import sys
import yaml
import argparse
"""
Goals:
0: Convert a packaged list of dependencies and versions
to a distro-specific list of dependencies.
1: Remove need for requirements.txt using Pip syntax as this is
misleading.
2: output a list of binary package names for the requested distribution
and suite to pass to docker scripts and LXC unit test jobs.
"""
# Goals:
# 0: Convert a packaged list of dependencies and versions
# to a distro-specific list of dependencies.
# 1: Remove need for requirements.txt using Pip syntax as this is
# misleading.
# 2: output a list of binary package names for the requested distribution
# and suite to pass to docker scripts and LXC unit test jobs.
def debian(args, depends):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment