diff options
-rwxr-xr-x | dlpcvp.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -186,7 +186,11 @@ def get_version_from_pypi(name: str, con: DBConnType = None) -> Optional[LooseVe curr_etag = str(resp.info()['ETag']) if curr_etag: update_etags(con, name, None, None, curr_etag) - return LooseVersion(info_dict['version']) + + # Cleanup version + version = info_dict['version'].replace('-', '.') + + return LooseVersion(version) except HTTPError as ex: if ex.getcode() == 404: log.warning(f'Cannot find {name} on PyPI') |