Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: catch version errors and continue #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions src/wheel2deb/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,17 @@ def is_required(r):
for pdep, req in zip(debnames, requirements):

def check(x):
if req.specifier.contains(x.version, prereleases=True):
logger.info(f"{x} satisfies requirement {req}")
else:
logger.warning(f"{x} does not satisfy requirement {req}")
return ctx.ignore_upstream_versions or req.specifier.contains(
x.version, prereleases=True
)
try:
if req.specifier.contains(x.version, prereleases=True):
logger.info(f"{x} satisfies requirement {req}")
else:
logger.warning(f"{x} does not satisfy requirement {req}")
return ctx.ignore_upstream_versions or req.specifier.contains(
x.version, prereleases=True
)
except Exception as e:
logger.warning(f"{x} does not satisfy requirement: {e}")
return False

version = None
for candidate in candidates[req.name]:
Expand Down