Skip to content

Conversation

@luojiyin1987
Copy link

Fixes #69

Summary

Replace del item['page'] with item.pop('page', None) to avoid KeyError when 'page' key doesn't exist.

Change

  • Line 677: del item_copy['page']item_copy.pop('page', None)
  • Line 681: del item['page']item.pop('page', None)

Impact

  • Before: KeyError crashes the process if 'page' key is missing
  • After: Gracefully handles missing 'page' key

Using del item_copy['page'] raises KeyError if 'page' key doesn't exist.
Use pop('page', None) for safe removal without exception.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: use pop() instead of del in process_none_page_numbers

1 participant