Fix library updates when a version is declared in VCS format (not SemVer)

This commit is contained in:
Ivan Kravets
2018-01-09 21:56:21 +02:00
parent 61872dd734
commit e4f8a1877c
3 changed files with 10 additions and 8 deletions
+2
View File
@@ -211,6 +211,8 @@ class PkgInstallerMixin(object):
try:
return semantic_version.Version(value)
except ValueError:
if "." not in str(value) and not str(value).isdigit():
raise ValueError("Invalid SemVer version %s" % value)
return semantic_version.Version.coerce(value)
except ValueError as e:
if raise_exception: