Skip to content

Commit f08f851

Browse files
committed
fix: _append_tool_name list index out of range
1 parent 3c6d173 commit f08f851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google/cloud/aiplatform/telemetry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def tool_context_manager(tool_name: str) -> None:
5353

5454

5555
def _append_tool_name(tool_name: str) -> None:
56-
if _tool_names_to_append[-1] != tool_name:
56+
if not _tool_names_to_append or _tool_names_to_append[-1] != tool_name:
5757
_tool_names_to_append.append(tool_name)
5858

5959

0 commit comments

Comments
 (0)