mirror of
https://github.com/python/cpython.git
synced 2024-11-27 11:55:13 +08:00
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:
|
||||
try:
|
||||
e.state = getint(s)
|
||||
except TclError:
|
||||
except ValueError:
|
||||
e.state = s
|
||||
e.time = getint(t)
|
||||
e.width = getint(w)
|
||||
@ -1547,7 +1547,7 @@ class Scale(Widget):
|
||||
value = self.tk.call(self._w, 'get')
|
||||
try:
|
||||
return getint(value)
|
||||
except TclError:
|
||||
except ValueError:
|
||||
return getdouble(value)
|
||||
def set(self, value):
|
||||
self.tk.call(self._w, 'set', value)
|
||||
|
Loading…
Reference in New Issue
Block a user