Skip to content

Commit

Permalink
Remove reports folder
Browse files Browse the repository at this point in the history
Based on the new requirements, we need to remove the reports folder.
  • Loading branch information
tibor19 authored Sep 13, 2024
1 parent c17947e commit a7b6ae7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/verifier/core/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def create(self, aid, dig, filename, typ, stream):
z.extractall(path=tempdirname)
manifest = None
for root, dirs, _ in os.walk(tempdirname):
if "META-INF" not in dirs or 'reports' not in dirs:
if "META-INF" not in dirs:

Check warning on line 121 in src/verifier/core/reporting.py

View check run for this annotation

Codecov / codecov/patch

src/verifier/core/reporting.py#L121

Added line #L121 was not covered by tests
continue
metaDir = os.path.join(root, 'META-INF')
name = os.path.join(root, 'META-INF', 'reports.json')
Expand Down Expand Up @@ -391,7 +391,7 @@ def recur(self, tyme):
files = []
manifest = None
for root, dirs, _ in os.walk(tempdirname):
if "META-INF" not in dirs or 'reports' not in dirs:
if "META-INF" not in dirs:

Check warning on line 394 in src/verifier/core/reporting.py

View check run for this annotation

Codecov / codecov/patch

src/verifier/core/reporting.py#L394

Added line #L394 was not covered by tests
continue

metaDir = os.path.join(root, 'META-INF')
Expand All @@ -404,8 +404,7 @@ def recur(self, tyme):
if "documentInfo" not in manifest:
raise kering.ValidationError("Invalid manifest file in report package, missing "
"'documentInfo")
reportsDir = os.path.join(root, 'reports')
files = os.listdir(reportsDir)
files = os.listdir(root)

Check warning on line 407 in src/verifier/core/reporting.py

View check run for this annotation

Codecov / codecov/patch

src/verifier/core/reporting.py#L407

Added line #L407 was not covered by tests

if manifest is None:
raise kering.ValidationError("No manifest in file, invalid signed report package")
Expand Down

0 comments on commit a7b6ae7

Please sign in to comment.