From 927a9d41317ab602ae6ca1810013d0d574834a8a Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 12 May 2016 11:04:28 -0700 Subject: [PATCH] Add platform in Python UserAgent --- ClientRuntimes/Python/msrest/msrest/configuration.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ClientRuntimes/Python/msrest/msrest/configuration.py b/ClientRuntimes/Python/msrest/msrest/configuration.py index 0c2ae4785d6ad..f9b4e06d20971 100644 --- a/ClientRuntimes/Python/msrest/msrest/configuration.py +++ b/ClientRuntimes/Python/msrest/msrest/configuration.py @@ -31,7 +31,7 @@ except ImportError: import ConfigParser as configparser from ConfigParser import NoOptionError -import sys +import platform import requests @@ -68,8 +68,9 @@ def __init__(self, base_url, filepath=None): self.redirect_policy = ClientRedirectPolicy() # User-Agent Header - self._user_agent = "python/{} requests/{} msrest/{}".format( - sys.version.split(' ')[0], + self._user_agent = "python/{} ({}) requests/{} msrest/{}".format( + platform.python_version(), + platform.platform(), requests.__version__, msrest_version)