mirror of
https://github.com/MISP/misp-galaxy.git
synced 2024-11-26 16:57:18 +00:00
fix: [adoc] ignore deprecated galaxies
This commit is contained in:
parent
4ab9bbbfa3
commit
76668d0ebb
1 changed files with 6 additions and 2 deletions
|
@ -28,10 +28,14 @@ thisDir = os.path.dirname(__file__)
|
||||||
clusters = []
|
clusters = []
|
||||||
|
|
||||||
pathClusters = os.path.join(thisDir, '../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:
|
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()
|
clusters.sort()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue