From 1b027fae8775027ca93cf458b19609f5c416eb06 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 28 May 2018 18:07:23 -0400 Subject: [PATCH] add some extra linux meta data to analytics --- lbrynet/core/system_info.py | 4 ++++ setup.py | 1 + 2 files changed, 5 insertions(+) diff --git a/lbrynet/core/system_info.py b/lbrynet/core/system_info.py index 95cd74bc9..abdca9145 100644 --- a/lbrynet/core/system_info.py +++ b/lbrynet/core/system_info.py @@ -2,6 +2,7 @@ import platform import json import subprocess import os +import distro from urllib2 import urlopen, URLError from lbryschema import __version__ as lbryschema_version @@ -36,6 +37,9 @@ def get_platform(get_ip=True): "lbryschema_version": lbryschema_version, "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 if get_ip: diff --git a/setup.py b/setup.py index d4e4c0f43..7076b14b5 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ from setuptools import setup, find_packages requires = [ 'Twisted', 'appdirs', + 'distro', 'base58', 'envparse', 'jsonrpc',