aboutsummaryrefslogtreecommitdiffstats
path: root/git_deps
diff options
context:
space:
mode:
authorAdam Spiers <github@adamspiers.org>2019-01-21 00:00:56 +0100
committerGitHub <noreply@github.com>2019-01-21 00:00:56 +0100
commit04c30cd050238eb6a902a2ab9781c23b5afd1c67 (patch)
treead5949d56bb53baa67d91e54ec54a30fc174b1c8 /git_deps
parentb4e3cd5b3588d29d2bb98ee619f443b24b32395f (diff)
parent095ccc5c927389eb6915caa17853d7bba90eb6b1 (diff)
downloadgit-deps-04c30cd050238eb6a902a2ab9781c23b5afd1c67.tar.gz
Merge pull request #84 from mstefani/master
Don't crash with commit messages that aren't valid utf-8
Diffstat (limited to 'git_deps')
-rw-r--r--git_deps/gitutils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/git_deps/gitutils.py b/git_deps/gitutils.py
index f699551..47355d2 100644
--- a/git_deps/gitutils.py
+++ b/git_deps/gitutils.py
@@ -55,7 +55,11 @@ class GitUtils(object):
@classmethod
def oneline(cls, commit):
- return commit.message.split('\n', 1)[0]
+ try:
+ ret = commit.message.split('\n', 1)[0]
+ except UnicodeDecodeError:
+ ret = "Invalid utf-8 commit message"
+ return ret
@classmethod
def commit_summary(cls, commit):