frozen api
This commit is contained in:
parent
99dc71a752
commit
f50935523f
|
@ -157,6 +157,9 @@ class Option(HiddenBaseType, DisabledBaseType):
|
|||
def is_forced_on_freeze(self):
|
||||
return self._frozen and self._force_default_on_freeze
|
||||
|
||||
def is_frozen(self):
|
||||
return self._frozen
|
||||
|
||||
def getdoc(self):
|
||||
return self.doc
|
||||
|
||||
|
@ -176,7 +179,7 @@ class Option(HiddenBaseType, DisabledBaseType):
|
|||
# config *must* be only the **parent** config (not the toplevel config)
|
||||
# owner is a **real* owner, a list is actually allowable here
|
||||
name = self._name
|
||||
if self._frozen:
|
||||
if self.is_frozen() and config.is_frozen():
|
||||
raise TypeError("trying to change a frozen option's owner: %s" % name)
|
||||
if self.is_multi():
|
||||
if not type(owner) == list:
|
||||
|
|
Loading…
Reference in New Issue