mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
refactor: Change path calculation to use pathlib in a better way
This commit is contained in:
parent
71f5f03a20
commit
5ca7121fd8
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ def parse_json_main_index(out_dir: str=OUTPUT_DIR) -> Iterator[Link]:
|
||||||
yield Link.from_json(link_json)
|
yield Link.from_json(link_json)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
try:
|
try:
|
||||||
detail_index_path = Path(f"{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 retrieve index from {}. The index may be corrupt.".format(detail_index_path, **ANSI))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue