Skip to content

Commit 6d41603

Browse files
committed
Fix comments after review
1 parent bf3eecc commit 6d41603

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sentry_sdk/profiler.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,14 @@ def has_profiling_enabled(hub=None):
198198
if hub is None:
199199
hub = sentry_sdk.Hub.current
200200

201-
if hub.client:
202-
options = hub.client.options
201+
client = hub.client
202+
203+
if client:
204+
options = client.options
203205
profiling_enabled = bool(options and options["_experiments"].get("enable_profiling"))
204-
dynamic_profiling_enabled = hub.client._get_feature_flag_info("@@profilingEnabled")
206+
dynamic_profiling_enabled = client._get_feature_flag_info("@@profilingEnabled")
205207
if dynamic_profiling_enabled is not None:
206-
profiling_enabled = dynamic_profiling_enabled
208+
profiling_enabled = dynamic_profiling_enabled.result
207209
return profiling_enabled
208210
return False
209211

0 commit comments

Comments
 (0)