From 70ac34a6726158cc177eda038c62a69371d1d9ea Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Wed, 5 Aug 2015 15:07:30 -0600 Subject: [PATCH] Don't barf when git fails I'm not totally sold this is the best idea, but I felt like it while working --- bin/overview-by-date | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/overview-by-date b/bin/overview-by-date index 503775d..752344a 100755 --- a/bin/overview-by-date +++ b/bin/overview-by-date @@ -64,7 +64,11 @@ def _git_checkout_by_date(repo, timepoint): 'checkout', commit, ] - output = subprocess.check_output(command, stderr=subprocess.STDOUT) + try: + 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()) return output