From 34e1e209b7d5704c98b5253b0bbbaf9900423b36 Mon Sep 17 00:00:00 2001 From: "Vincent A. Cicirello" Date: Fri, 22 Jul 2022 13:23:24 -0400 Subject: [PATCH] eliminate redundant code --- generatesitemap.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/generatesitemap.py b/generatesitemap.py index 1a9d4366..fde2e4fe 100755 --- a/generatesitemap.py +++ b/generatesitemap.py @@ -233,12 +233,7 @@ def urlstring(f, baseUrl, dropExtension=False) : u = f[1:] else : u = f - if len(u) >= 11 and u[-11:] == "/index.html" : - u = u[:-10] - elif u == "index.html" : - u = "" - elif dropExtension and len(u) >= 5 and u[-5:] == ".html" : - u = u[:-5] + u = sortname(u, dropExtension) if len(u) >= 1 and u[0]=="/" and len(baseUrl) >= 1 and baseUrl[-1]=="/" : u = u[1:] elif (len(u)==0 or u[0]!="/") and (len(baseUrl)==0 or baseUrl[-1]!="/") :