add some extra linux meta data to analytics
This commit is contained in:
parent
187f920961
commit
1b027fae87
2 changed files with 5 additions and 0 deletions
|
@ -2,6 +2,7 @@ import platform
|
||||||
import json
|
import json
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
|
import distro
|
||||||
|
|
||||||
from urllib2 import urlopen, URLError
|
from urllib2 import urlopen, URLError
|
||||||
from lbryschema import __version__ as lbryschema_version
|
from lbryschema import __version__ as lbryschema_version
|
||||||
|
@ -36,6 +37,9 @@ def get_platform(get_ip=True):
|
||||||
"lbryschema_version": lbryschema_version,
|
"lbryschema_version": lbryschema_version,
|
||||||
"build": build_type.BUILD, # CI server sets this during build step
|
"build": build_type.BUILD, # CI server sets this during build step
|
||||||
}
|
}
|
||||||
|
if p["os_system"] == "Linux":
|
||||||
|
p["distro"] = distro.info()
|
||||||
|
p["desktop"] = os.environ.get('XDG_CURRENT_DESKTOP', 'Unknown')
|
||||||
|
|
||||||
# TODO: remove this from get_platform and add a get_external_ip function using treq
|
# TODO: remove this from get_platform and add a get_external_ip function using treq
|
||||||
if get_ip:
|
if get_ip:
|
||||||
|
|
1
setup.py
1
setup.py
|
@ -17,6 +17,7 @@ from setuptools import setup, find_packages
|
||||||
requires = [
|
requires = [
|
||||||
'Twisted',
|
'Twisted',
|
||||||
'appdirs',
|
'appdirs',
|
||||||
|
'distro',
|
||||||
'base58',
|
'base58',
|
||||||
'envparse',
|
'envparse',
|
||||||
'jsonrpc',
|
'jsonrpc',
|
||||||
|
|
Loading…
Add table
Reference in a new issue