Skip to content

Commit

Permalink
Parse UTF-8 output from git status
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella authored and wkentaro committed Aug 9, 2015
1 parent 7efd692 commit ce669f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gitstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# collect git status information
untracked, staged, changed, conflicts = [], [], [], []
ahead, behind = 0, 0
status = [(line[0], line[1], line[2:]) for line in stdout.splitlines()]
status = [(line[0], line[1], line[2:]) for line in stdout.decode('utf-8').splitlines()]
for st in status:
if st[0] == '#' and st[1] == '#':
if len(st[2].strip().split('...')) == 1:
Expand Down Expand Up @@ -58,4 +58,3 @@
str(len(untracked)),
])
print(out, end='')

0 comments on commit ce669f1

Please sign in to comment.