changed the semantics of required and default in settings definitions.
I think it makes more logical sense now. Essentially, the default is always used if the user doesn't specify a value. If there is no user specified value and the default is None, then the action depends on the value of required. required=True means raise an error. required=False means silently omit that setting.
This commit is contained in:
@@ -33,7 +33,7 @@ class MultiWorldParser(object):
|
||||
|
||||
self._settings[settingname] = setting
|
||||
|
||||
if not setting.required:
|
||||
if setting.required and setting.default is not None:
|
||||
self._config_state[settingname] = setting.default
|
||||
|
||||
def set_config_item(self, itemname, itemvalue):
|
||||
|
||||
Reference in New Issue
Block a user