scripts/build.py aktualisiert
This commit is contained in:
1 parent
2bbf6f2ecb
commit
bed1f9ad8a
1 file changed
+13
-5
+13
-5
@@ -36,15 +36,23 @@ def get_git_revision(path):
|
||||
|
||||
def input_files(repo):
|
||||
d = repo / 'data'
|
||||
if not d.exists():
|
||||
return
|
||||
|
||||
# Nur tatsächliche CVE-Datensätze einlesen
|
||||
if not d.is_dir():
|
||||
raise RuntimeError(
|
||||
f'Data directory missing: {d}'
|
||||
)
|
||||
|
||||
if repo.name == 'vuln-cve':
|
||||
yield from sorted(d.rglob('CVE-*.json'))
|
||||
files = sorted(d.rglob('CVE-*.json'))
|
||||
|
||||
if not files:
|
||||
raise RuntimeError(
|
||||
f'No CVE records found in {d}'
|
||||
)
|
||||
|
||||
yield from files
|
||||
return
|
||||
|
||||
# Andere Quellen unverändert verarbeiten
|
||||
yield from sorted(d.rglob('*.json'))
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user