summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-05-24 11:37:15 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-05-24 11:37:15 (GMT)
commit5489597f56e82f9b8d2b519651f80241f4ea4326 (patch)
treea47653a1f0340488de659586878260f4d37475e4 /Lib/lib-tk
parent8225103d2d381991703970dc601ef83a12da7fc5 (diff)
downloadcpython-5489597f56e82f9b8d2b519651f80241f4ea4326.zip
cpython-5489597f56e82f9b8d2b519651f80241f4ea4326.tar.gz
cpython-5489597f56e82f9b8d2b519651f80241f4ea4326.tar.bz2
Convert tcl_version to str before comparing. Fixes #729317.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 8f598b8..2025ba8 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1567,7 +1567,8 @@ class Tk(Misc, Wm):
raise RuntimeError, \
"tk.h version (%s) doesn't match libtk.a version (%s)" \
% (_tkinter.TK_VERSION, tk_version)
- tcl_version = self.tk.getvar('tcl_version')
+ # Under unknown circumstances, tcl_version gets coerced to float
+ tcl_version = str(self.tk.getvar('tcl_version'))
if tcl_version != _tkinter.TCL_VERSION:
raise RuntimeError, \
"tcl.h version (%s) doesn't match libtcl.a version (%s)" \