Commit 2bb39948 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #19029: Change non-existing since 3.0 StringType to str.

parent 75eb5de7
...@@ -126,7 +126,7 @@ class tixCommand: ...@@ -126,7 +126,7 @@ class tixCommand:
for x in self.tk.split(self.tk.call('tix', 'configure')): for x in self.tk.split(self.tk.call('tix', 'configure')):
cnf[x[0][1:]] = (x[0][1:],) + x[1:] cnf[x[0][1:]] = (x[0][1:],) + x[1:]
return cnf return cnf
if isinstance(cnf, StringType): if isinstance(cnf, str):
x = self.tk.split(self.tk.call('tix', 'configure', '-'+cnf)) x = self.tk.split(self.tk.call('tix', 'configure', '-'+cnf))
return (x[0][1:],) + x[1:] return (x[0][1:],) + x[1:]
return self.tk.call(('tix', 'configure') + self._options(cnf)) return self.tk.call(('tix', 'configure') + self._options(cnf))
...@@ -388,9 +388,9 @@ class TixWidget(tkinter.Widget): ...@@ -388,9 +388,9 @@ class TixWidget(tkinter.Widget):
"""Set configuration options for all subwidgets (and self).""" """Set configuration options for all subwidgets (and self)."""
if option == '': if option == '':
return return
elif not isinstance(option, StringType): elif not isinstance(option, str):
option = repr(option) option = repr(option)
if not isinstance(value, StringType): if not isinstance(value, str):
value = repr(value) value = repr(value)
names = self._subwidget_names() names = self._subwidget_names()
for name in names: for name in names:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment