we can pickle object
This commit is contained in:
@ -30,9 +30,9 @@ class Base(object):
|
||||
'_state_readonly', '_state_requires', '_stated',
|
||||
'_multi', '_validator', '_validator_params', '_default',
|
||||
'_default_multi', '_state_callback', '_callback',
|
||||
'_callback_params', '_multitype', '_consistencies',
|
||||
'_warnings_only', '_master_slaves', '_state_consistencies',
|
||||
'_extra', '__weakref__')
|
||||
'_state_callback_params', '_callback_params', '_multitype',
|
||||
'_consistencies', '_warnings_only', '_master_slaves',
|
||||
'_state_consistencies', '_extra', '__weakref__')
|
||||
|
||||
def __init__(self):
|
||||
try:
|
||||
@ -68,7 +68,7 @@ class Base(object):
|
||||
|
||||
class OptionDescription(Base):
|
||||
__slots__ = ('_children', '_cache_paths', '_cache_consistencies',
|
||||
'_group_type', '_is_build_cache')
|
||||
'_group_type', '_is_build_cache', '_state_group_type')
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
@ -158,6 +158,10 @@ class OptionDescription(Base):
|
||||
if name == '_name':
|
||||
return object.__getattribute__(self, name)
|
||||
try:
|
||||
if name == '_readonly':
|
||||
raise AttributeError("{0} instance has no attribute "
|
||||
"'_readonly'".format(
|
||||
self.__class__.__name__))
|
||||
return self._children[1][self._children[0].index(name)]
|
||||
except ValueError:
|
||||
raise AttributeError(_('unknown Option {0} '
|
||||
|
Reference in New Issue
Block a user