Skip to content

Commit 8161b41

Browse files
fix(apiclient): fix useragent string. missing semicolon
1 parent 9c706e9 commit 8161b41

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

hexonet/apiconnector/apiclient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def getUserAgent(self):
8484
pyv = platform.python_version()
8585
pf = platform.system()
8686
arch = platform.architecture()[0]
87-
self.__ua = "%s (%s %s rv:%s) python/%s" % (pid, pf, arch, self.getVersion(), pyv)
87+
self.__ua = "%s (%s; %s; rv:%s) python/%s" % (pid, pf, arch, self.getVersion(), pyv)
8888
return self.__ua
8989

9090
def setUserAgent(self, pid, rv):
@@ -94,7 +94,7 @@ def setUserAgent(self, pid, rv):
9494
pyv = platform.python_version()
9595
pf = platform.system()
9696
arch = platform.architecture()[0]
97-
self.__ua = "%s (%s %s rv:%s) python-sdk/%s python/%s" % (pid, pf, arch, rv, self.getVersion(), pyv)
97+
self.__ua = "%s (%s; %s; rv:%s) python-sdk/%s python/%s" % (pid, pf, arch, rv, self.getVersion(), pyv)
9898

9999
def getVersion(self):
100100
"""

tests/test_apiclient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_apiclientmethods():
111111
pyv = platform.python_version()
112112
pf = platform.system()
113113
arch = platform.architecture()[0]
114-
ua = "%s (%s %s rv:%s) python/%s" % (pid, pf, arch, cl.getVersion(), pyv)
114+
ua = "%s (%s; %s; rv:%s) python/%s" % (pid, pf, arch, cl.getVersion(), pyv)
115115
assert cl.getUserAgent() == ua
116116

117117
# #.setUserAgent()
@@ -121,7 +121,7 @@ def test_apiclientmethods():
121121
pyv = platform.python_version()
122122
pf = platform.system()
123123
arch = platform.architecture()[0]
124-
ua = "%s (%s %s rv:%s) %s/%s python/%s" % (pid, pf, arch, rv, pid2, cl.getVersion(), pyv)
124+
ua = "%s (%s; %s; rv:%s) %s/%s python/%s" % (pid, pf, arch, rv, pid2, cl.getVersion(), pyv)
125125
cl.setUserAgent(pid, rv)
126126
assert cl.getUserAgent() == ua
127127

0 commit comments

Comments
 (0)