From e83b646f52649daa96fa67eef761d5e5d17be86e Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Fri, 24 Sep 2021 19:42:03 +0200 Subject: [PATCH] This is a Python 3 script Remove Python2 test, this will at the same time remove a DeepSource false positive about `reload` being an undefined name. Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> --- www/html.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/www/html.py b/www/html.py index aa4b88aa..72b7ce99 100755 --- a/www/html.py +++ b/www/html.py @@ -14,12 +14,7 @@ import getopt import xml.sax import codecs -if sys.version_info >= (3, 0): - sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) -else: - reload(sys) - sys.setdefaultencoding('utf-8') - sys.stdout = codecs.getwriter("utf-8")(sys.stdout) +sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) lookupdir = '' -- 2.49.0