1
0
Fork 0

feat: Update path generation in detail index fallback

Co-authored-by: Nick Sweeting <git@sweeting.me>
This commit is contained in:
Cristian Vargas 2020-07-22 14:46:03 -05:00 committed by GitHub
parent 263eb4e372
commit e58c3deb05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ def parse_json_main_index(out_dir: str=OUTPUT_DIR) -> Iterator[Link]:
try: try:
yield Link.from_json(link_json) yield Link.from_json(link_json)
except KeyError: except KeyError:
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))
return () return ()
@ -155,4 +155,3 @@ def to_json(obj: Any, indent: Optional[int]=4, sort_keys: bool=True, cls=Extende
return pyjson.dumps(obj, indent=indent, sort_keys=sort_keys, cls=ExtendedEncoder) return pyjson.dumps(obj, indent=indent, sort_keys=sort_keys, cls=ExtendedEncoder)