Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 24 lines (18 sloc) 0.779 kB
3f8fa30 @twobraids changed get_required_config to return a Namespace rather than a raw d…
twobraids authored
1 from .namespace import Namespace
2
3
cfc208e @twobraids added class lists with namespaces. moved required config to it own f…
twobraids authored
4 #==============================================================================
5 class RequiredConfig(object):
6 #--------------------------------------------------------------------------
7 @classmethod
8 def get_required_config(cls):
3f8fa30 @twobraids changed get_required_config to return a Namespace rather than a raw d…
twobraids authored
9 result = Namespace()
0c0ff0d @twobraids set_default to allow redefining defaults in Options
twobraids authored
10 for a_class in reversed(cls.__mro__):
cfc208e @twobraids added class lists with namespaces. moved required config to it own f…
twobraids authored
11 try:
12 result.update(a_class.required_config)
13 except AttributeError:
14 pass
15 return result
16
17 #--------------------------------------------------------------------------
18 def config_assert(self, config):
19 for a_parameter in self.required_config.keys():
20 assert a_parameter in config, \
21 '%s missing from config' % a_parameter
22
23
Something went wrong with that request. Please try again.