提交 97269458 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Fix issue with version logic when tags are not available

This happens when the project is cloned at a fixed depth and there are no tags present at the given depth.
上级 117b40c9
...@@ -17,7 +17,7 @@ short_version = full_version.split("+")[0] ...@@ -17,7 +17,7 @@ short_version = full_version.split("+")[0]
try: try:
int(short_version.split(".")[2]) int(short_version.split(".")[2])
release = True release = True
except ValueError: except (ValueError, IndexError):
release = False release = False
if release and info["error"] is None: if release and info["error"] is None:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论