From 222b4e78656d5ea6265748e52f4fd4e839939c10 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Feb 20 2020 09:23:51 +0000 Subject: Fix inconsistent type of SFM2API.query_sfm2 * Fix return type description in query_sfm2 docstring. * Remove unecessary "element" variable initialization which has wrong type. Signed-off-by: Chenxiong Qi --- diff --git a/freshmaker/sfm2.py b/freshmaker/sfm2.py index d9b6554..597b2a9 100644 --- a/freshmaker/sfm2.py +++ b/freshmaker/sfm2.py @@ -52,7 +52,7 @@ class SFM2API(object): It queries api/public/flaws?id=$cve&include_fields=affects,impact endpoint. :param str cve: CVE, for example "CVE-2017-10268". - :rtype: list + :rtype: dict :return: dict with two keys, "impact", and "affects". The first references the impact of the CVE, and the second is a list of dicts representing packages affected by the CVE. @@ -79,7 +79,6 @@ class SFM2API(object): and "pkg_name" of the affected packages. """ max_rating = -1 - elements = [] affected_pkgs = [] severity = None for cve in cve_list: