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: