[2/9] Fix flake8 errors in dap/server.py

Message ID 20240319-more-flake8-v1-2-893549dbed75@adacore.com
State New
Headers
Series Make gdb/python flake-clean |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed

Commit Message

Tom Tromey March 19, 2024, 5:33 p.m. UTC
  Commit 032d23a6 ("Fix stray KeyboardInterrupt after cancel")
introduced some errors into dap/server.py.  A function is called but
not imported, and the wrong variable name is used.  This patch
corrects both errors.
---
 gdb/python/lib/gdb/dap/server.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gdb/python/lib/gdb/dap/server.py b/gdb/python/lib/gdb/dap/server.py
index cba5a308ff1..70646f4d75c 100644
--- a/gdb/python/lib/gdb/dap/server.py
+++ b/gdb/python/lib/gdb/dap/server.py
@@ -32,6 +32,7 @@  from .startup import (
     log,
     log_stack,
     LogLevel,
+    thread_log,
 )
 from .typecheck import type_check
 
@@ -478,7 +479,7 @@  class Cancellable(object):
                 pass
             else:
                 # Exception happened.  Ignore and log it.
-                err_string = "%s, %s" % (err, type(err))
+                err_string = "%s, %s" % (e, type(e))
                 thread_log("caught exception: " + err_string)
                 log_stack()