summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslosphinx/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/oslosphinx/__init__.py b/oslosphinx/__init__.py
index 7f311c8..239eed4 100644
--- a/oslosphinx/__init__.py
+++ b/oslosphinx/__init__.py
@@ -26,7 +26,8 @@ def _guess_cgit_link():
git_remote = subprocess.check_output(
['git', 'config', '--local', '--get', 'remote.origin.url']
)
- except subprocess.CalledProcessError:
+ except (OSError, subprocess.CalledProcessError):
+ # git is not present or the command failed
return None
else:
if six.PY3: