From 9f70876576191a9eb30fd202876bf38badec2d32 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 27 Aug 2015 14:46:04 -0600 Subject: [PATCH] Fix unicode problems with overview-by-date --- bin/overview-by-date | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/overview-by-date b/bin/overview-by-date index 752344a..dd58b3a 100755 --- a/bin/overview-by-date +++ b/bin/overview-by-date @@ -31,6 +31,7 @@ def _get_commit_count(repo, start, end, my_email): '--before={}'.format(end.isoformat())] LOGGER.debug(" ".join(command)) output = subprocess.check_output(command) + output = output.decode('utf-8') lines = output.split('\n') total = len(lines) if output else 0 my_lines = [line for line in lines if my_email in line] @@ -84,7 +85,8 @@ def _count_tests(repo): LOGGER.debug(" ".join(command)) try: output = subprocess.check_output(command, stderr=subprocess.STDOUT) - except subprocess.CalledProcessError: + output = output.decode('utf-8') + except subprocess.CalledProcessError as e: LOGGER.info("Failed to call py.test for %s", repo) return 0 count = 0 @@ -126,7 +128,7 @@ def main(): #LOGGER.setLevel(logging.DEBUG) config = teamanalysis.config.get() - timepoint = datetime.datetime(2013, 12, 30, 0, 0, 1) + timepoint = datetime.datetime(2015, 8, 1, 0, 0, 1) now = datetime.datetime.utcnow() while timepoint < now + datetime.timedelta(days=7): _show_summary(timepoint, config['my_email'])