From: Simon Marchi Date: Wed, 29 Oct 2025 17:49:24 +0000 (-0400) Subject: gdb/testsuite: rename ambiguous variable in py-command-breakpoint.py X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=750ef8f6e9c4d4767006782afeb75a06091904ff;p=thirdparty%2Fbinutils-gdb.git gdb/testsuite: rename ambiguous variable in py-command-breakpoint.py Fix this flake8 warning: gdb/testsuite/gdb.python/py-commands-breakpoint.py:37:13: E741 ambiguous variable name 'l' This one is a bit subjective, but renaming the variable is easy enough and the simplest way to get rid of the warning. Change-Id: I9b1ffd898e27a9d0e172f29715aff3ff3cc785b9 Approved-By: Tom Tromey --- diff --git a/gdb/testsuite/gdb.python/py-commands-breakpoint.py b/gdb/testsuite/gdb.python/py-commands-breakpoint.py index dbe7676d6ba..df732e7922a 100644 --- a/gdb/testsuite/gdb.python/py-commands-breakpoint.py +++ b/gdb/testsuite/gdb.python/py-commands-breakpoint.py @@ -34,10 +34,10 @@ class PyCommandsBreakpoint(gdb.Breakpoint): def __setattr__(self, name, value): if name == "commands": - l = ["python PyCommandsBreakpoint.run_py_commands(%d)" % self.number] + cmds = ["python PyCommandsBreakpoint.run_py_commands(%d)" % self.number] if value != "": - l.append(value) - value = "\n".join(l) + cmds.append(value) + value = "\n".join(cmds) super().__setattr__(name, value)