setup: link to latest docs if VCS information is not available.

This commit is contained in:
Ben Newhouse 2020-10-27 01:16:25 +00:00 committed by GitHub
parent e3207b74f4
commit 765c15c709
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,9 @@ def doc_version():
return ""
git = parse_git(".")
if git.exact:
if not git:
return ""
elif git.exact:
return git.format_with("{tag}")
else:
return "latest"