builder.py: Only disable tests if they are there

For checking the dependencies, the tests are removed. But if the tests
are not enabled at all, that triggers a python exception.
This commit is contained in:
Christian Mauderer
2021-06-11 14:17:11 +02:00
committed by Christian Mauderer
parent b45e44eabb
commit 2c1f61133e

View File

@@ -1062,7 +1062,8 @@ class ModuleManager(object):
def _checkDependencies(self):
enabled_modules = self.getEnabledModules()
enabled_modules.remove('tests')
if 'tests' in enabled_modules:
enabled_modules.remove('tests')
for mod in enabled_modules:
if mod not in self.modules:
raise KeyError('enabled module not found: %s' % (mod))