From 2d9b445e4133fac7cd9aecaf6d22d379b5e1598d Mon Sep 17 00:00:00 2001 From: Igor Boky Date: Thu, 25 Jan 2018 16:37:37 +0300 Subject: [PATCH] Updated os -> platform within useragent module to make it possible to use the module on `Windows OS` --- klarnacheckout/useragent.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/klarnacheckout/useragent.py b/klarnacheckout/useragent.py index 8f4b03d..dd1e47f 100644 --- a/klarnacheckout/useragent.py +++ b/klarnacheckout/useragent.py @@ -21,9 +21,9 @@ # limitations under the License. import sys -import os +import platform -__version__ = '3.0.1' +__version__ = '3.0.2' class UserAgent(object): @@ -45,8 +45,8 @@ def __init__(self): "version": __version__ }, "OS": { - "name": os.uname()[0], - "version": os.uname()[2] + "name": platform.uname()[0], + "version": platform.uname()[2] }, "Language": { "name": "Python", @@ -77,4 +77,4 @@ def __str__(self): if "options" in value: parts.append("(%s)" % (" ; ".join(value["options"]))) - return " ".join(parts) + return " ".join(parts) \ No newline at end of file