Only do settings checking on all-uppercase attributes (to please Sphinx)

This commit is contained in:
Stein Magnus Jodal 2010-03-20 01:37:30 +01:00
parent 71031701d6
commit 3d2aa08782

View File

@ -35,7 +35,7 @@ class SettingsError(Exception):
class Settings(object):
def __getattr__(self, attr):
if not hasattr(raw_settings, attr):
if attr.isupper() and not hasattr(raw_settings, attr):
raise SettingsError(u'Setting "%s" is not set.' % attr)
value = getattr(raw_settings, attr)
if type(value) != bool and not value: