Skip to content

Commit

Permalink
chore: verify custom user agent is type str (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon authored Mar 26, 2024
1 parent 8209ba2 commit f66022d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/cloud/alloydb/connector/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _format_user_agent(
Appends user-defined user agents to the base default agent.
"""
agent = f"{USER_AGENT}+{driver}" if driver else USER_AGENT
if custom_user_agent:
if custom_user_agent and isinstance(custom_user_agent, str):
agent = f"{agent} {custom_user_agent}"

return agent
Expand Down

0 comments on commit f66022d

Please sign in to comment.