Skip to content

Commit 2492514

Browse files
BruceVonKmsintov
authored andcommitted
VIC-14254 incorrect user agent reported (#181)
* Reverting to older Python string handling to avoid this issue * Added python implementation/version information to help debugging
1 parent f07874e commit 2492514

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

anki_vector/configure/__main__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import json
3131
import os
3232
from pathlib import Path
33+
import platform
3334
import re
3435
import socket
3536
import sys
@@ -66,7 +67,10 @@ class Api:
6667
def __init__(self):
6768
self._handler = ApiHandler(
6869
headers={
69-
'User-Agent': f'Vector-sdk/{anki_vector.__version__}',
70+
'User-Agent': 'Vector-sdk/{} {}/{}'.format(anki_vector.__version__,
71+
platform.python_implementation(),
72+
platform.python_version(),
73+
7074
'Anki-App-Key': 'aung2ieCho3aiph7Een3Ei'
7175
},
7276
url='https://accounts.api.anki.com/1/sessions'

0 commit comments

Comments
 (0)