Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions wacz/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ def check_required_contents(self):
print("Datapackage is missing from your wacz file")
return 1
if (
glob.glob(os.path.join(self.dir.name, "archive/*.warc")) == False
and glob.glob(os.path.join(self.dir.name, "archive/*.warc.gz")) == False
not glob.glob(os.path.join(self.dir.name, "archive/*.warc"))
and not glob.glob(os.path.join(self.dir.name, "archive/*.warc.gz"))
):
print(
"A warc file is missing from your archive folder you must have a .warc or .warc.gz file in your archive folder"
)
return 1
if (
glob.glob(os.path.join(self.dir.name, "indexes/index.cdx.gz")) == False
and glob.glob(os.path.join(self.dir.name, "indexes/index.cdx.gz")) == False
and glob.glob(os.path.join(self.dir.name, "indexes/index.idx")) == False
not glob.glob(os.path.join(self.dir.name, "indexes/index.cdx.gz"))
and not glob.glob(os.path.join(self.dir.name, "indexes/index.cdx"))
and not glob.glob(os.path.join(self.dir.name, "indexes/index.idx"))
):
print(
"An index file is missing from your indexes folder you must have an index.cdx.gz, index,cdx or index.idx in your index folder"
)
return 1
if glob.glob(os.path.join(self.dir.name, "pages/pages.jsonl")) == False:
if not glob.glob(os.path.join(self.dir.name, "pages/pages.jsonl")):
print(
"An index file is missing from your indexes folder you must have an index.cdx.gz, index,cdx or index.idx in your index folder"
)
Expand Down