getint() now raises ValueError, not TclError, on errors.
This commit is contained in:
parent
795a4bc666
commit
fe02efdbf4
|
@ -569,7 +569,7 @@ class Misc:
|
||||||
# not an integer:
|
# not an integer:
|
||||||
try:
|
try:
|
||||||
e.state = getint(s)
|
e.state = getint(s)
|
||||||
except TclError:
|
except ValueError:
|
||||||
e.state = s
|
e.state = s
|
||||||
e.time = getint(t)
|
e.time = getint(t)
|
||||||
e.width = getint(w)
|
e.width = getint(w)
|
||||||
|
@ -1547,7 +1547,7 @@ class Scale(Widget):
|
||||||
value = self.tk.call(self._w, 'get')
|
value = self.tk.call(self._w, 'get')
|
||||||
try:
|
try:
|
||||||
return getint(value)
|
return getint(value)
|
||||||
except TclError:
|
except ValueError:
|
||||||
return getdouble(value)
|
return getdouble(value)
|
||||||
def set(self, value):
|
def set(self, value):
|
||||||
self.tk.call(self._w, 'set', value)
|
self.tk.call(self._w, 'set', value)
|
||||||
|
|
Loading…
Reference in New Issue