setup: link to latest docs if VCS information is not available.
authorBen Newhouse <ben@bubbli.co>
Tue, 27 Oct 2020 01:16:25 +0000 (01:16 +0000)
committerGitHub <noreply@github.com>
Tue, 27 Oct 2020 01:16:25 +0000 (01:16 +0000)
setup.py

index 040bb37f3eced9a731ae23129c44577a16a2a4c0..4cd96e793ca25772300f1efc700697c74f682d4a 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -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"