Skip to content

Commit a990146

Browse files
committed
:= looks like walrus horizontally
1 parent 97b96de commit a990146

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/databricks/sql/telemetry/telemetry_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,8 @@ def close_telemetry_client(session_id_hex):
398398
"""Remove the telemetry client for a specific connection"""
399399
global _initialized, _executor
400400
with _lock:
401-
if session_id_hex in _clients:
401+
if (telemetry_client := _clients.pop(session_id_hex, None)) is not None:
402402
logger.debug("Removing telemetry client for connection %s", session_id_hex)
403-
telemetry_client = _clients.pop(session_id_hex, None)
404403
telemetry_client.close()
405404

406405
# Shutdown executor if no more clients

0 commit comments

Comments
 (0)