Prevent KeyError in checkdeps if detectOS() returns None

This commit is contained in:
Dmitri Bogomolov 2018-07-22 14:48:08 +03:00
parent 5115425a61
commit 72873a1bd4
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -137,6 +137,8 @@ if prereqs:
OPSYS = detectOS() OPSYS = detectOS()
CMD = PACKAGE_MANAGER[OPSYS] if OPSYS in PACKAGE_MANAGER else 'UNKNOWN_INSTALLER' CMD = PACKAGE_MANAGER[OPSYS] if OPSYS in PACKAGE_MANAGER else 'UNKNOWN_INSTALLER'
for lhs, rhs in EXTRAS_REQUIRE.items(): for lhs, rhs in EXTRAS_REQUIRE.items():
if OPSYS is None:
break
if rhs and any([ if rhs and any([
EXTRAS_REQUIRE_DEPS[x][OPSYS] EXTRAS_REQUIRE_DEPS[x][OPSYS]
for x in rhs for x in rhs