mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
python: Do not explicitly state variables are global when only read
If a variable is not modified in a scope there is no need for the use of
global in such scope. Without this patch build fails with:
F824 `global ...` is unused: name is never assigned in scope
It is a bit difficult to find more information on that message and error
code, I found it here:
https://docs.astral.sh/ruff/rules/global-variable-not-assigned/
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
@@ -278,7 +278,6 @@ class QMPProxy(object):
|
||||
else:
|
||||
error = True
|
||||
except Exception as e:
|
||||
global debug
|
||||
if debug:
|
||||
print("%s: %s" % (sys.argv[0], str(e)))
|
||||
print(traceback.format_exc())
|
||||
|
||||
Reference in New Issue
Block a user