Merge branch 'master' into orm

Conflicts:
	test/test_parsing_group.py
This commit is contained in:
2014-02-03 22:11:58 +01:00
5 changed files with 90 additions and 8 deletions

View File

@ -152,8 +152,6 @@ class SubConfig(object):
except UnicodeEncodeError:
lines.append("{0} = {1}".format(name,
value.encode(default_encoding)))
except PropertiesOptionError:
pass
return '\n'.join(lines)
__repr__ = __str__
@ -525,7 +523,7 @@ class _CommonConfig(SubConfig):
# ----- state
def __getstate__(self):
if self._impl_meta is not None:
raise ConfigError('cannot serialize Config with MetaConfig')
raise ConfigError(_('cannot serialize Config with MetaConfig'))
slots = set()
for subclass in self.__class__.__mro__:
if subclass is not object:
@ -539,8 +537,8 @@ class _CommonConfig(SubConfig):
pass
storage = self._impl_values._p_._storage
if not storage.serializable:
raise ConfigError('this storage is not serialisable, could be a '
'none persistent storage')
raise ConfigError(_('this storage is not serialisable, could be a '
'none persistent storage'))
state['_storage'] = {'session_id': storage.session_id,
'persistent': storage.persistent}
state['_impl_setting'] = _impl_getstate_setting()
@ -727,6 +725,4 @@ def mandatory_warnings(config):
except PropertiesOptionError as err:
if err.proptype == ['mandatory']:
yield path
except ConfigError:
pass
config.cfgimpl_reset_cache(only=('values',))