1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-22 06:03:23 +02:00

Update warning message on detail index error

Co-authored-by: Nick Sweeting <git@sweeting.me>
This commit is contained in:
Cristian Vargas
2020-07-23 10:23:41 -05:00
committed by GitHub
parent 5ca7121fd8
commit 51716bbf74

View File

@@ -58,7 +58,7 @@ def parse_json_main_index(out_dir: str=OUTPUT_DIR) -> Iterator[Link]:
detail_index_path = Path(OUTPUT_DIR) / ARCHIVE_DIR_NAME / link_json['timestamp'] detail_index_path = Path(OUTPUT_DIR) / ARCHIVE_DIR_NAME / link_json['timestamp']
yield parse_json_link_details(str(detail_index_path)) yield parse_json_link_details(str(detail_index_path))
except KeyError: except KeyError:
print(" {lightyellow}! Failed to retrieve index from {}. The index may be corrupt.".format(detail_index_path, **ANSI)) print(" {lightyellow}! Failed to load the index.json from {}".format(detail_index_path, **ANSI))
continue continue
return () return ()
@@ -161,4 +161,3 @@ class ExtendedEncoder(pyjson.JSONEncoder):
def to_json(obj: Any, indent: Optional[int]=4, sort_keys: bool=True, cls=ExtendedEncoder) -> str: def to_json(obj: Any, indent: Optional[int]=4, sort_keys: bool=True, cls=ExtendedEncoder) -> str:
return pyjson.dumps(obj, indent=indent, sort_keys=sort_keys, cls=ExtendedEncoder) return pyjson.dumps(obj, indent=indent, sort_keys=sort_keys, cls=ExtendedEncoder)