Skip to content

Commit

Permalink
Replace deprecated threading.currentThread with threading.current_thr…
Browse files Browse the repository at this point in the history
…ead (#565)
  • Loading branch information
hugovk authored Jun 13, 2022
1 parent ef43486 commit 0dc8434
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions newrelic/api/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,7 @@ def __enter__(self):
# actual thread and not a greenlet.

if not hasattr(sys, "_current_frames") or self.thread_id in sys._current_frames():
try:
thread_instance = threading.current_thread()
except TypeError:
thread_instance = threading.currentThread()
thread_instance = threading.current_thread()

self._utilization_tracker = utilization_tracker(self.application.name)
if self._utilization_tracker:
Expand Down

0 comments on commit 0dc8434

Please sign in to comment.