Skip to content

Commit 87930f5

Browse files
committed
tmp: revert
1 parent a328dc6 commit 87930f5

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

pulp_python/app/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ def check_blocklist_for_packages(self, packages):
456456
"Blocklisted packages cannot be added to this repository: "
457457
"{}".format(", ".join(blocked))
458458
)
459+
if False:
460+
raise ValidationError()
459461

460462

461463
class PythonBlocklistEntry(BaseModel):

pulp_python/tests/functional/utils.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ def ensure_simple(
6767
how would one know that it's there?*
6868
"""
6969

70-
def explore_links(page_url, page_name, links_found):
71-
msgs = ""
70+
def explore_links(page_url, page_name, links_found, msgs):
7271
legit_found_links = []
7372
page_content = requests.get(page_url).text
7473
page = html.fromstring(page_content)
@@ -92,18 +91,15 @@ def explore_links(page_url, page_name, links_found):
9291
msgs += f"\nFound {page_name} link without href {link.text}"
9392
else:
9493
msgs += f"\nFound extra {page_name} link {link.text}"
95-
return legit_found_links, msgs
94+
return legit_found_links
9695

9796
packages_found = {name: False for name in packages.keys()}
9897
releases_found = {name: False for releases in packages.values() for name in releases}
99-
found_release_links, msgs = explore_links(simple_url, "simple", packages_found)
98+
msgs = ""
99+
found_release_links = explore_links(simple_url, "simple", packages_found, msgs)
100100
dl_links = []
101101
for rel_link in found_release_links:
102-
new_links, new_msgs = explore_links(
103-
urljoin(simple_url, rel_link), "release", releases_found
104-
)
105-
dl_links += new_links
106-
msgs += new_msgs
102+
dl_links += explore_links(urljoin(simple_url, rel_link), "release", releases_found, msgs)
107103
for dl_link in dl_links:
108104
package_link, _, sha = dl_link.partition("#sha256=")
109105
if len(sha) != 64:

0 commit comments

Comments
 (0)