[binutils-gdb] [gdb] Fix flake8 warning in gdb.python/py-inf-exited-at-exit.py

Tom de Vries via Gdb-cvs <[email protected]> Mon, 15 Jun 2026 08:28:41 +0000 (GMT)
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d4d5cf13cba6bee05612e16bf8bef8b1978c1178

commit d4d5cf13cba6bee05612e16bf8bef8b1978c1178
Author: Tom de Vries <[email protected]>
Date:   Mon Jun 15 10:28:32 2026 +0200

    [gdb] Fix flake8 warning in gdb.python/py-inf-exited-at-exit.py
    
    With current trunk we have:
    ...
    $ pre-commit run flake8 --all-files
    flake8..................................................................Failed
    - hook id: flake8
    - exit code: 1
    
    gdb.python/py-inf-exited-at-exit.py:22:1: F821 undefined name 'gdb'
    ...
    
    Fix this by adding the missing import.

Diff:
---
 gdb/testsuite/gdb.python/py-inf-exited-at-exit.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/testsuite/gdb.python/py-inf-exited-at-exit.py b/gdb/testsuite/gdb.python/py-inf-exited-at-exit.py
index 9a5440b083f..4a73e562bc4 100644
--- a/gdb/testsuite/gdb.python/py-inf-exited-at-exit.py
+++ b/gdb/testsuite/gdb.python/py-inf-exited-at-exit.py
@@ -13,6 +13,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import gdb
+
 
 def exit_event_handler(event):
     inf = event.inferior