Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (23 sloc) 1.04 KB
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
from __future__ import absolute_import, division, print_function
from configman.namespace import Namespace
class RequiredConfig(object):
def get_required_config(cls):
result = Namespace()
for a_class in reversed(cls.__mro__):
except AttributeError:
return result
def config_assert(self, config):
for a_parameter in self.required_config.keys():
assert a_parameter in config, (
'%s missing from config' % a_parameter