1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

Skip empty lines in indices

This commit is contained in:
Tessa Walsh 2024-04-24 01:26:25 +02:00
parent abe755b1de
commit e71159c25b

View File

@ -228,6 +228,8 @@ directory structure expected by pywb
wacz_index = open(wacz_index_path, 'rb')
for line in wacz_index:
if not line:
continue
cdx_object = CDXObject(cdxline=line)
if cdx_object['filename'] in filename_mapping:
cdx_object['filename'] = filename_mapping[cdx_object['filename']]