aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdlpcvp.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/dlpcvp.py b/dlpcvp.py
index fdf6a75..af4378d 100755
--- a/dlpcvp.py
+++ b/dlpcvp.py
@@ -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')