Skip to content

Commit c24a480

Browse files
committed
removing redundent get statement
1 parent 1735a2d commit c24a480

File tree

1 file changed

+3
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid

1 file changed

+3
-2
lines changed

Diff for: instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ def trace_tween(request):
193193
else:
194194
activation.__exit__(None, None, None)
195195

196-
if request.environ.get(_ENVIRON_TOKEN, None) is not None:
197-
context.detach(request.environ.get(_ENVIRON_TOKEN))
196+
env_token = request.environ.get(_ENVIRON_TOKEN, None)
197+
if env_token is not None:
198+
context.detach(env_token)
198199

199200
return response
200201

0 commit comments

Comments
 (0)