From a5f2c93c6e9816033948394d90d1beca6e62b54c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Thu, 7 Sep 2017 18:53:07 +0200 Subject: [PATCH] Generate minimals with set compression Also fixes problem with unnecessary spaces in list of packages --- openqa-maintenance.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/openqa-maintenance.py b/openqa-maintenance.py index 9012110c..e2f95bdd 100755 --- a/openqa-maintenance.py +++ b/openqa-maintenance.py @@ -100,13 +100,11 @@ with open(opa.join(data_path, "data/repos.json"), 'r') as f: with open(opa.join(data_path, "data/apimap.json"), 'r') as f: API_MAP = json.load(f) -MINIMALS = set() -minimals = requests.get( - 'https://gitlab.suse.de/qa-maintenance/metadata/raw/master/packages-to-be-tested-on-minimal-systems') -for line in minimals.text.split('\n'): - if line.startswith('#') or line.startswith(' ') or len(line) == 0: - continue - MINIMALS.add(line) +MINIMALS = { + x.rstrip() + for x in requests.get( + 'https://gitlab.suse.de/qa-maintenance/metadata/raw/master/packages-to-be-tested-on-minimal-systems').iter_lines() + if len(x) > 0 and not(x.startswith("#") or x.startswith(' '))} class Update(object):