handle distro import error

This commit is contained in:
Jack Robison 2018-08-17 10:28:47 -04:00
parent 4a8776be10
commit c21956b4f3
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -36,9 +36,12 @@ def get_platform(get_ip=True):
"build": build_type.BUILD, # CI server sets this during build step
}
if p["os_system"] == "Linux":
try:
import distro
p["distro"] = distro.info()
p["desktop"] = os.environ.get('XDG_CURRENT_DESKTOP', 'Unknown')
except ModuleNotFoundError:
pass
# TODO: remove this from get_platform and add a get_external_ip function using treq
if get_ip: