summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-06-08 15:43:55 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-06-08 15:43:55 (GMT)
commit4fafda731ac36ba2bb77342294cca70856c46505 (patch)
tree1a9872738a8437fee61f480c2b3cff18ae95075b /Lib
parent391af751f2a19476cfaa53ddc35fd53aaa582e9c (diff)
downloadcpython-4fafda731ac36ba2bb77342294cca70856c46505.zip
cpython-4fafda731ac36ba2bb77342294cca70856c46505.tar.gz
cpython-4fafda731ac36ba2bb77342294cca70856c46505.tar.bz2
Issue #24408: Fixed AttributeError in measure() and metrics() methods of
tkinter.Font.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/tkinter/font.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py
index e74049c..1364257 100644
--- a/Lib/tkinter/font.py
+++ b/Lib/tkinter/font.py
@@ -151,7 +151,7 @@ class Font:
args = (text,)
if displayof:
args = ('-displayof', displayof, text)
- return self._root.tk.getint(self._call("font", "measure", self.name, *args))
+ return self._tk.getint(self._call("font", "measure", self.name, *args))
def metrics(self, *options, **kw):
"""Return font metrics.
@@ -164,13 +164,13 @@ class Font:
args = ('-displayof', displayof)
if options:
args = args + self._get(options)
- return self._root.tk.getint(
+ return self._tk.getint(
self._call("font", "metrics", self.name, *args))
else:
res = self._split(self._call("font", "metrics", self.name, *args))
options = {}
for i in range(0, len(res), 2):
- options[res[i][1:]] = self._root.tk.getint(res[i+1])
+ options[res[i][1:]] = self._tk.getint(res[i+1])
return options