Ensure required settings are defined correctly.

Possible fix for #424. If a setting has not been overidden in a subclass
or set in the user's config then raise an exception.
This commit is contained in:
Facetoe 2016-08-07 01:16:27 +08:00
parent 1528f04de0
commit 5bb40926b8

View File

@ -33,7 +33,7 @@ class SettingsBaseMeta(type):
# required anymore.
for base in inspect.getmro(cls):
for r in list(required):
if hasattr(base, r):
if hasattr(base, r) and getattr(base, r) != getattr(cls, r):
required.remove(r)
return unique(settings), required