not use super or raise error, causes some problems
This commit is contained in:
parent
621a739198
commit
b82f1ae2bc
|
@ -29,7 +29,7 @@ class SpaceSeparatedListOfTypes(registry.SpaceSeparatedListOf):
|
||||||
class ReadOnlyValue(registry.Integer):
|
class ReadOnlyValue(registry.Integer):
|
||||||
"""This is a read only option."""
|
"""This is a read only option."""
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(ReadOnlyValue, self).__init__(*args, **kwargs)
|
registry.Integer.__init__(self, *args, **kwargs)
|
||||||
self.value = None
|
self.value = None
|
||||||
|
|
||||||
def set(self, s):
|
def set(self, s):
|
||||||
|
@ -39,7 +39,8 @@ class ReadOnlyValue(registry.Integer):
|
||||||
else:
|
else:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.error()
|
#self.error() # commented, this causes a lot of trouble.
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
|
Loading…
Reference in New Issue