From 5489597f56e82f9b8d2b519651f80241f4ea4326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 24 May 2003 11:37:15 +0000 Subject: [PATCH] Convert tcl_version to str before comparing. Fixes #729317. --- Lib/lib-tk/Tkinter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 8f598b82db1..2025ba84b8d 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)" \