forked from LBRYCommunity/lbry-sdk
handle distro import error
This commit is contained in:
parent
4a8776be10
commit
c21956b4f3
1 changed files with 6 additions and 3 deletions
|
@ -36,9 +36,12 @@ def get_platform(get_ip=True):
|
||||||
"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":
|
if p["os_system"] == "Linux":
|
||||||
import distro
|
try:
|
||||||
p["distro"] = distro.info()
|
import distro
|
||||||
p["desktop"] = os.environ.get('XDG_CURRENT_DESKTOP', 'Unknown')
|
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
|
# TODO: remove this from get_platform and add a get_external_ip function using treq
|
||||||
if get_ip:
|
if get_ip:
|
||||||
|
|
Loading…
Reference in a new issue