public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] Remove f-string from DAP
@ 2023-08-03 16:27 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-08-03 16:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

One more f-string snuck into the DAP code, in breakpoint.py.  Most of
them were removed here:

    https://sourceware.org/pipermail/gdb-patches/2023-June/200023.html

but I think this one landed after that patch.

While DAP only supports Python 3.5 and later, f-strings were added in
3.6, so remove this.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30708
---
 gdb/python/lib/gdb/dap/breakpoint.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/python/lib/gdb/dap/breakpoint.py b/gdb/python/lib/gdb/dap/breakpoint.py
index 0aab4f3c089..76ff129ddbc 100644
--- a/gdb/python/lib/gdb/dap/breakpoint.py
+++ b/gdb/python/lib/gdb/dap/breakpoint.py
@@ -352,7 +352,7 @@ def _catch_exception(filterId, **args):
     if filterId in ("assert", "exception", "throw", "rethrow", "catch"):
         cmd = "-catch-" + filterId
     else:
-        raise Exception(f"Invalid exception filterID: {filterId}")
+        raise Exception("Invalid exception filterID: " + str(filterId))
     result = gdb.execute_mi(cmd)
     # A little lame that there's no more direct way.
     for bp in gdb.breakpoints():
-- 
2.40.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-03 16:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-03 16:27 [pushed] Remove f-string from DAP Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).