From 76668d0ebb2a99f0c7f6916800c327693da81745 Mon Sep 17 00:00:00 2001 From: Christophe Vandeplas Date: Sun, 27 Oct 2019 18:35:44 +0100 Subject: [PATCH] fix: [adoc] ignore deprecated galaxies --- tools/adoc_galaxy.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/adoc_galaxy.py b/tools/adoc_galaxy.py index 7bf1b60..e1d1466 100755 --- a/tools/adoc_galaxy.py +++ b/tools/adoc_galaxy.py @@ -28,10 +28,14 @@ thisDir = os.path.dirname(__file__) clusters = [] pathClusters = os.path.join(thisDir, '../clusters') +pathGalaxies = os.path.join(thisDir, '../galaxies') -for f in os.listdir(pathClusters): +for f in os.listdir(pathGalaxies): if '.json' in f: - clusters.append(f) + with open(os.path.join(pathGalaxies, f), 'r') as f_in: + galaxy_data = json.load(f_in) + if galaxy_data.get('namespace') != 'deprecated': + clusters.append(f) clusters.sort()