Skip to content

Commit f66022d

Browse files
chore: verify custom user agent is type str (GoogleCloudPlatform#288)
1 parent 8209ba2 commit f66022d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google/cloud/alloydb/connector/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def _format_user_agent(
3939
Appends user-defined user agents to the base default agent.
4040
"""
4141
agent = f"{USER_AGENT}+{driver}" if driver else USER_AGENT
42-
if custom_user_agent:
42+
if custom_user_agent and isinstance(custom_user_agent, str):
4343
agent = f"{agent} {custom_user_agent}"
4444

4545
return agent

0 commit comments

Comments
 (0)