Codebase list oslo-sphinx / f8d71ac
trap errors from git not being present subprocess raises OSError if the command it is asked to run isn't found, so trap that as well as the subprocess-specific error we were already catching. Change-Id: Ieb9c7f3ccc307250847104a7f97cfa28603fcf5d Closes-Bug: #1521541 Doug Hellmann 8 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
2525 git_remote = subprocess.check_output(
2626 ['git', 'config', '--local', '--get', 'remote.origin.url']
2727 )
28 except subprocess.CalledProcessError:
28 except (OSError, subprocess.CalledProcessError):
29 # git is not present or the command failed
2930 return None
3031 else:
3132 if six.PY3: