diff options
author | Tom Tromey <tom@tromey.com> | 2022-04-01 14:29:35 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-04-04 03:40:22 -0600 |
commit | ea6303b4971b0959329a1ae01648b16a4f4ac154 (patch) | |
tree | d2d54f61d062dcb864979a0b4f002a5fcd8dcfbd | |
parent | cbf26882c0cafe85e309376d9883a93a0fbc3180 (diff) | |
download | fsf-binutils-gdb-ea6303b4971b0959329a1ae01648b16a4f4ac154.zip fsf-binutils-gdb-ea6303b4971b0959329a1ae01648b16a4f4ac154.tar.gz fsf-binutils-gdb-ea6303b4971b0959329a1ae01648b16a4f4ac154.tar.bz2 |
Remove more Python 2 code
I found another more place that still had a workaround for Python 2.
This patch removes it.
-rw-r--r-- | gdb/python/lib/gdb/FrameDecorator.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/gdb/python/lib/gdb/FrameDecorator.py b/gdb/python/lib/gdb/FrameDecorator.py index 46febcd..118673f 100644 --- a/gdb/python/lib/gdb/FrameDecorator.py +++ b/gdb/python/lib/gdb/FrameDecorator.py @@ -15,15 +15,6 @@ import gdb -# This small code snippet deals with problem of strings in Python 2.x -# and Python 3.x. Python 2.x has str and unicode classes which are -# sub-classes of basestring. In Python 3.x all strings are encoded -# and basestring has been removed. -try: - basestring -except NameError: - basestring = str - class FrameDecorator(object): """Basic implementation of a Frame Decorator""" @@ -252,7 +243,7 @@ class FrameVars(object): # SYM may be a string instead of a symbol in the case of # synthetic local arguments or locals. If that is the case, # always fetch. - if isinstance(sym, basestring): + if isinstance(sym, str): return True sym_type = sym.addr_class |