Skip to content

Commit 0dc8434

Browse files
authored
Replace deprecated threading.currentThread with threading.current_thread (#565)
1 parent ef43486 commit 0dc8434

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

newrelic/api/transaction.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,7 @@ def __enter__(self):
376376
# actual thread and not a greenlet.
377377

378378
if not hasattr(sys, "_current_frames") or self.thread_id in sys._current_frames():
379-
try:
380-
thread_instance = threading.current_thread()
381-
except TypeError:
382-
thread_instance = threading.currentThread()
379+
thread_instance = threading.current_thread()
383380

384381
self._utilization_tracker = utilization_tracker(self.application.name)
385382
if self._utilization_tracker:

0 commit comments

Comments
 (0)