scripts/pythondistdeps: Version handling exception with better information

This commit is contained in:
Tomas Orsava 2020-04-20 16:39:28 +02:00
parent d48f3500d8
commit 972beac29a
1 changed files with 5 additions and 1 deletions

View File

@ -134,7 +134,11 @@ OPERATORS = {'~=': convert_compatible,
def convert(name, operator, version_id):
return OPERATORS[operator](name, operator, version_id)
try:
return OPERATORS[operator](name, operator, version_id)
except Exception as exc:
raise RuntimeError("Cannot process Python package version `{}` for name `{}`".
format(version_id, name)) from exc
def normalize_name(name):