docs(script): fix python3 data type error

This commit is contained in:
dongheng
2019-06-14 14:52:45 +08:00
parent 7ad4ba421e
commit 96a67a9816

View File

@ -162,6 +162,8 @@ def get_version():
# Otherwise, use git to look for a tag
try:
tag = subprocess.check_output(["git", "describe", "--tags", "--exact-match"]).strip()
if isinstance(tag, bytes):
tag = tag.decode()
is_stable = re.match(r"v[0-9\.]+$", tag) is not None
return (tag, "tag", is_stable)
except subprocess.CalledProcessError: