Skip to content

Commit

Permalink
Improve code quality (thanks @merwok).
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocaccamo committed Mar 4, 2024
1 parent 77966d7 commit ba602fb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions freeze/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,7 @@ def scan_url(url):

path = os.path.normpath(url.replace(site_url, ""))

if (
path.endswith(".html")
or path.endswith("sitemap.xml")
or path.endswith("robots.txt")
):
if path.endswith((".html", "sitemap.xml", "robots.txt")):
logger.debug(f"path (file) -> {path}")
file_slash = path.rfind("/") + 1
file_dirs = path[0:file_slash]
Expand Down

0 comments on commit ba602fb

Please sign in to comment.