Skip to content

Commit d51867a

Browse files
nicoloboschisasha-gitg
authored andcommitted
Copybara import of the project:
-- f08f851 by Nicolò Boschi <[email protected]>: fix: _append_tool_name list index out of range COPYBARA_INTEGRATE_REVIEW=#3911 from nicoloboschi:fix-_append_tool_name f08f851 PiperOrigin-RevId: 641254571
1 parent 15d963d commit d51867a

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)