Skip to content

Commit

Permalink
unpatch less strict
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-papazian committed Feb 5, 2025
1 parent 20dbe8d commit fed3053
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ddtrace/contrib/internal/requests/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,13 @@ def unpatch():
return
requests.__datadog_patch = False

_u(requests.Session, "request")
_u(requests.Session, "send")
try:
_u(requests.Session, "request")
except AttributeError:
# It was not patched
pass
try:
_u(requests.Session, "send")
except AttributeError:
# It was not patched
pass

0 comments on commit fed3053

Please sign in to comment.