distro package is in setup.py, does not make sense to wrap it in try/except ModuleNotFoundError

This commit is contained in:
Lex Berezhny 2019-01-23 22:01:20 -05:00
parent c2b9909397
commit 4d5823f473

View file

@ -20,11 +20,8 @@ def get_platform() -> dict:
"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
import distro
p["distro"] = distro.info()
p["desktop"] = os.environ.get('XDG_CURRENT_DESKTOP', 'Unknown')
return p