Skip to content

Commit

Permalink
fix(requirements): correctly generate URLs for packages
Browse files Browse the repository at this point in the history
Avoid overwriting package name by inner loop.

Fixes #13872
  • Loading branch information
nijel committed Feb 14, 2025
1 parent 8a6a518 commit 9bfd4b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weblate/utils/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def get_version_module(name, optional=False):
url = package.get("Home-page")
if url is None and (project_urls := package.get_all("Project-URL")):
for project_url in project_urls:
name, current_url = project_url.split(",", 1)
if name.lower().strip() == "homepage":
url_name, current_url = project_url.split(",", 1)
if url_name.lower().strip() == "homepage":
url = current_url.strip()
break
if url is None:
Expand Down

0 comments on commit 9bfd4b5

Please sign in to comment.