mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
getint() now raises ValueError, not TclError, on errors.
This commit is contained in:
parent
795a4bc666
commit
fe02efdbf4
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue