Skip to content

Commit 2e9337b

Browse files
committed
v0.8.1 - Handle unicode decoding error
1 parent bd80f17 commit 2e9337b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

git2dot.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
import sys
100100

101101

102-
VERSION = '0.8'
102+
VERSION = '0.8.1'
103103
DEFAULT_GITCMD = 'git log --format="|Record:|%h|%p|%d|%ci%n%b"' # --gitcmd
104104
DEFAULT_RANGE = '--all --topo-order' # --range
105105

@@ -294,7 +294,11 @@ def runcmd_long(cmd, show_output=True):
294294
# all done, wait for returncode to get populated
295295
break
296296
else:
297-
char = char.decode('utf-8')
297+
try:
298+
# There is probably a better way to do this.
299+
char = char.decode('utf-8')
300+
except UnicodeDecodeError:
301+
continue
298302
output += char
299303
if show_output:
300304
sys.stdout.write(char)

0 commit comments

Comments
 (0)