Skip to content

Commit 15927d6

Browse files
committed
Set default user agent
1 parent 1caf21f commit 15927d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main/cloudfoundry_client/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ def __init__(self, target_endpoint: str, client_id: str = "cf", client_secret: s
151151
service_information = ServiceInformation(
152152
None, "%s/oauth/token" % info.authorization_endpoint, client_id, client_secret, [], verify
153153
)
154-
super(CloudFoundryClient, self).__init__(service_information, proxies=proxy, user_agent=kwargs.get("user_agent"))
154+
super(CloudFoundryClient, self).__init__(
155+
service_information,
156+
proxies=proxy,
157+
user_agent=kwargs.get("user_agent", "cf-python-client")
158+
)
155159
self.v2 = V2(target_endpoint_trimmed, self)
156160
self.v3 = V3(target_endpoint_trimmed, self)
157161
self._doppler = (

0 commit comments

Comments
 (0)