Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe02efd

Browse files
committed
getint() now raises ValueError, not TclError, on errors.
1 parent 795a4bc commit fe02efd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/lib-tk/Tkinter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def _substitute(self, *args):
569569
# not an integer:
570570
try:
571571
e.state = getint(s)
572-
except TclError:
572+
except ValueError:
573573
e.state = s
574574
e.time = getint(t)
575575
e.width = getint(w)
@@ -1547,7 +1547,7 @@ def get(self):
15471547
value = self.tk.call(self._w, 'get')
15481548
try:
15491549
return getint(value)
1550-
except TclError:
1550+
except ValueError:
15511551
return getdouble(value)
15521552
def set(self, value):
15531553
self.tk.call(self._w, 'set', value)

0 commit comments

Comments
 (0)