Skip to content

Commit

Permalink
Merge pull request #79 from aoberoi/feat.version-tracking
Browse files Browse the repository at this point in the history
adds python version to user-agent, fixes #78
  • Loading branch information
aoberoi committed Apr 22, 2016
2 parents 59fc18b + cbeb81c commit 33feedd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opentok/opentok.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import hashlib # _sign_string
import requests # create_session, archiving
import json # archiving
import platform # user-agent
from socket import inet_aton # create_session
import xml.dom.minidom as xmldom # create_session

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

Expand Down

0 comments on commit 33feedd

Please sign in to comment.