Skip to content

Commit

Permalink
chore: verify custom user agent is type str (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon authored Mar 26, 2024
1 parent 10445ca commit 34a7d8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/cloud/sql/connector/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

def _format_user_agent(driver: Optional[str], custom: Optional[str]) -> str:
agent = f"{USER_AGENT}+{driver}" if driver else USER_AGENT
if custom:
if custom and isinstance(custom, str):
agent = f"{agent} {custom}"
return agent

Expand Down

0 comments on commit 34a7d8e

Please sign in to comment.