From 611f4fabf041f1c00f418aab3bd0bfe3ae95c468 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Sat, 20 Nov 2021 09:18:24 +0100 Subject: [PATCH] Local variable redefined argument 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/html.py b/www/html.py index ea9e9f91..58d537ec 100755 --- a/www/html.py +++ b/www/html.py @@ -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): -- 2.49.0