Exclude Boxes classes starting with _ in getAllBoxGenerators()

Exclude mix-in classes that are not supposed to be used on their own
This commit is contained in:
Florian Festi 2017-02-12 22:20:32 +01:00
parent 399e5b468f
commit 0739fd0b94
1 changed files with 2 additions and 1 deletions

View File

@ -13,7 +13,8 @@ def getAllBoxGenerators():
for k, v in module.__dict__.items():
if v is boxes.Boxes:
continue
if inspect.isclass(v) and issubclass(v, boxes.Boxes):
if (inspect.isclass(v) and issubclass(v, boxes.Boxes) and
v.__name__[0] != '_'):
generators[modname + '.' + v.__name__] = v
return generators