◐ Shell
clean mode source ↗

fix: handle empty string in match_regex_list to prevent IndexError by wahajahmed010 · Pull Request #6509 · getsentry/sentry-python

When match_regex_list receives a pattern list containing an empty string,
item_matcher[-1] raises IndexError because empty strings have no characters.
This is reachable from the Celery integration when CeleryIntegration.exclude_beat_tasks
contains an empty string.

Fix: skip empty strings in the iteration loop before the [-1] access.

Fixes: getsentry#6504
Signed-off-by: Wahaj Ahmed <wahaj.ahmed010@gmail.com>