Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not append duplicates to user agent string #570

Merged
merged 8 commits into from Sep 2, 2021
Merged
3 changes: 2 additions & 1 deletion google/cloud/storage/_http.py
Expand Up @@ -56,7 +56,8 @@ def __init__(self, client, client_info=None, api_endpoint=None):
# TODO: When metrics all use gccl, this should be removed #9552
if self._client_info.user_agent is None: # pragma: no branch
self._client_info.user_agent = ""
self._client_info.user_agent += " gcloud-python/{} ".format(__version__)
if "gcloud-python/{}".format(__version__) not in self._client_info.user_agent:
self._client_info.user_agent += " gcloud-python/{} ".format(__version__)
ddelgrosso1 marked this conversation as resolved.
Show resolved Hide resolved

API_VERSION = "v1"
"""The version of the API, used in building the API call's URL."""
Expand Down