Skip to content

Commit

Permalink
Make the git log text strings be utf-8, to avoid b'...' messing thing…
Browse files Browse the repository at this point in the history
…s up
  • Loading branch information
ctk21 committed Sep 11, 2019
1 parent f3b75bd commit 4f218d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codespeed/commits/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def getlogs(endrev, startrev):
logs = []
for log in filter(None, stdout.split(b'\x1e')):
(short_commit_id, commit_id, date_t, author_name, author_email,
subject, body) = (s.strip() for s in log.split(b'\x00', 7))
subject, body) = (s.strip().decode('utf-8') for s in log.split(b'\x00', 7))

tag = ""

Expand All @@ -86,7 +86,7 @@ def getlogs(endrev, startrev):
stderr = b''

if proc.returncode == 0:
tag = stdout.strip()
tag = stdout.strip().decode('utf-8')

date = datetime.datetime.fromtimestamp(
int(date_t)).strftime("%Y-%m-%d %H:%M:%S")
Expand Down

0 comments on commit 4f218d2

Please sign in to comment.