frozen api

This commit is contained in:
gwen 2012-09-18 16:14:47 +02:00
parent 99dc71a752
commit f50935523f

View file

@ -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: