Skip to content

Commit

Permalink
Skip empty lines in indices
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Apr 23, 2024
1 parent abe755b commit e71159c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pywb/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def _add_wacz_index(self, collection_index_path, wacz_index_path, filename_mappi
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']]
Expand Down

0 comments on commit e71159c

Please sign in to comment.