]> xenbits.xensource.com Git - libvirt.git/commitdiff
scripts: Fix E741 that pycodesyle is pointing out during syntax-check
authorErik Skultety <eskultet@redhat.com>
Mon, 25 May 2020 12:46:26 +0000 (14:46 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 26 May 2020 06:51:15 +0000 (08:51 +0200)
With newer pycodestyle 2.6.0 (which is part of flake8-3.8.2) reports
the following pep violation during syntax-check:

../scripts/check-remote-protocol.py:95:9: E741 ambiguous variable name 'l'
    for l in err.strip().split("\n")

On all the distros we test on, this hasn't occurred yet, but with the
future update of flake8 it likely would. The fix is easy, just name the
variable appropriately.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
scripts/check-remote-protocol.py

index 25caa195636e5a7740c66a8f5dbb65f66f051d6b..cf9e3f84a1b1d4254990da3c0bb08b91b8f2a698 100644 (file)
@@ -92,8 +92,8 @@ if out == "" or pdwtagsproc.returncode != 0:
     else:
         print("WARNING: exit code %d, pdwtags appears broken:" %
               pdwtagsproc.returncode, file=sys.stderr)
-    for l in err.strip().split("\n"):
-        print("WARNING: %s" % l, file=sys.stderr)
+    for line in err.strip().split("\n"):
+        print("WARNING: %s" % line, file=sys.stderr)
     print("WARNING: skipping the remote protocol test", file=sys.stderr)
     sys.exit(0)