From ea9d82a968087740429da82855e633a36827d591 Mon Sep 17 00:00:00 2001 From: Andrei Paplauski Date: Apr 21 2020 08:52:48 +0000 Subject: Code style fixes + remove unsused imports RESOLVES: FACTORY-5860 and FACTORY-5861 --- diff --git a/freshmaker/lightblue.py b/freshmaker/lightblue.py index c5d963b..3e78ed5 100644 --- a/freshmaker/lightblue.py +++ b/freshmaker/lightblue.py @@ -295,7 +295,6 @@ class ContainerImage(dict): for archive in archives if archive['btype'] == 'image'] return ' '.join(sorted(arches)) - def resolve_commit(self): """ Uses the ContainerImage data to resolve the information about @@ -1198,8 +1197,6 @@ class LightBlue(object): img["content_sets"] = list(new_content_sets) images.append(img) - - # In case we query for unpublished images, we need to return just # the latest NVR for given name-version, otherwise images would # contain all the versions which ever containing the srpm_name. diff --git a/freshmaker/utils.py b/freshmaker/utils.py index 6df9468..0c524bc 100644 --- a/freshmaker/utils.py +++ b/freshmaker/utils.py @@ -21,16 +21,12 @@ # import functools -import getpass -import os import subprocess import sys import tempfile import time import koji import kobo.rpmlib -import tarfile -import io from freshmaker import conf, app, log from freshmaker.types import ArtifactType @@ -163,6 +159,7 @@ def retry(timeout=conf.net_timeout, interval=conf.net_retry_interval, wait_on=Ex return inner return wrapper + def _run_command(command, logger=None, rundir=None, output=subprocess.PIPE, error=subprocess.PIPE, env=None, log_output=True): """Run a command, return output. Error out if command exit with non-zero code.""" diff --git a/tests/test_lightblue.py b/tests/test_lightblue.py index d7e7ee5..576070f 100644 --- a/tests/test_lightblue.py +++ b/tests/test_lightblue.py @@ -35,7 +35,6 @@ from freshmaker.lightblue import LightBlue from freshmaker.lightblue import LightBlueRequestError from freshmaker.lightblue import LightBlueSystemError from freshmaker.utils import sorted_by_nvr -from freshmaker import log from tests import helpers diff --git a/tests/test_utils.py b/tests/test_utils.py index e4dd8b0..b052863 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -20,9 +20,6 @@ # # Written by Jan Kaluza -import shutil -import tempfile - from unittest.mock import patch import pytest