SubConfig: first argument must be a OD

This commit is contained in:
Emmanuel Garette 2013-04-16 11:51:48 +02:00
parent 90999585fa
commit 16801ad1b2

View file

@ -42,6 +42,8 @@ class SubConfig(object):
:type context: `Config` :type context: `Config`
""" """
# main option description # main option description
if not isinstance(descr, OptionDescription):
raise ValueError(_('descr must be an optiondescription, not {0}').format(type(descr)))
self._cfgimpl_descr = descr self._cfgimpl_descr = descr
# sub option descriptions # sub option descriptions
self._cfgimpl_context = context self._cfgimpl_context = context