Skip to content

Commit

Permalink
only check if handler index matches if the caller supports multiple i…
Browse files Browse the repository at this point in the history
…ndices
  • Loading branch information
antoinevg committed Jan 22, 2024
1 parent 8ec720d commit e0b2b8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion facedancer/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def _wrapped(caller, request):
# Compute our two conditions...
field_matches = (getattr(request, field_name) == field_value)
index_matches = \
caller.matches_identifier(request.index & 0xff) if match_index else True
caller.matches_identifier(request.index & 0xff) \
if hasattr(caller, "matches_identifier") and match_index else True

# ... and call the inner function only if they match.
if field_matches and index_matches:
Expand Down

0 comments on commit e0b2b8e

Please sign in to comment.