From 8a52a923c065fcdc684ee578983fa8ed020439c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Jun 2024 14:20:23 -0400 Subject: [PATCH] Catch the ValueError in both invocations of DepsReader._read. Added a docstring to _read to explicitly declare the intended interface. Closes #105 --- pip_run/scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pip_run/scripts.py b/pip_run/scripts.py index 32baff6..d7f888e 100644 --- a/pip_run/scripts.py +++ b/pip_run/scripts.py @@ -154,7 +154,7 @@ def read_python(self): raw_reqs = suppress(ValueError)(self._read)('__requires__') or [] reqs_items = jaraco.text.yield_lines(raw_reqs) deps = Dependencies.load(reqs_items) - with contextlib.suppress(Exception): + with contextlib.suppress(ValueError): deps.index_url = self._read('__index_url__') return deps