Skip to content

Commit cbeb81c

Browse files
committed
adds python version to user-agent, fixes #78
1 parent 59fc18b commit cbeb81c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

opentok/opentok.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import hashlib # _sign_string
88
import requests # create_session, archiving
99
import json # archiving
10+
import platform # user-agent
1011
from socket import inet_aton # create_session
1112
import xml.dom.minidom as xmldom # create_session
1213

@@ -271,7 +272,7 @@ def create_session(self, location=None, media_mode=MediaModes.relayed, archive_m
271272
def headers(self):
272273
"""For internal use."""
273274
return {
274-
'User-Agent': 'OpenTok-Python-SDK/' + __version__,
275+
'User-Agent': 'OpenTok-Python-SDK/' + __version__ + ' ' + platform.python_version(),
275276
'X-TB-PARTNER-AUTH': self.api_key + ':' + self.api_secret
276277
}
277278

0 commit comments

Comments
 (0)