]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Local variable redefined argument
authorDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sat, 20 Nov 2021 08:18:24 +0000 (09:18 +0100)
committerDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sat, 26 Feb 2022 15:51:06 +0000 (16:51 +0100)
This fixes a DeepSource alert:

Argument redefined from local

A local name is redefining an argument, which might suggest a potential
error. This is taken into account only for a handful of name binding
operations, such as for iterations, with statements, and exception
handler assignments.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
www/html.py

index ea9e9f9113d1f4a9aaccd8849de28c38cd45edf7..58d537eca1f3403d923c07d31641433e8c015461 100755 (executable)
@@ -133,8 +133,9 @@ class docHandler(xml.sax.ContentHandler):
             writeHtml("<" + name)
             if attrs.getLength() > 0:
                 names = attrs.getNames()
-                for name in names:
-                    writeHtml(" " + name + "=\"" + attrs.get(name) + "\"")
+                for n in names:
+                    v = attrs.get(n)
+                    writeHtml(" " + n + "=\"" + v + "\"")
             writeHtml(" />" if name == "br" else ">")
 
     def characters(self, content):