Fix unicode problems with overview-by-date
This commit is contained in:
parent
1e23eb024e
commit
9f70876576
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue