Don't barf when git fails

I'm not totally sold this is the best idea, but I felt like it while
working
This commit is contained in:
Eli Ribble 2015-08-05 15:07:30 -06:00
parent 6c7f1642da
commit 70ac34a672
1 changed files with 5 additions and 1 deletions

View File

@ -64,7 +64,11 @@ def _git_checkout_by_date(repo, timepoint):
'checkout', 'checkout',
commit, commit,
] ]
try:
output = subprocess.check_output(command, stderr=subprocess.STDOUT) output = subprocess.check_output(command, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
LOGGER.warning("Failed to execute '%s' in %s", command, abspath)
return ''
LOGGER.debug("Checked out %s at %s", repo, timepoint.date().isoformat()) LOGGER.debug("Checked out %s at %s", repo, timepoint.date().isoformat())
return output return output