diff options
author | Adam Spiers <github@adamspiers.org> | 2019-01-21 00:00:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-21 00:00:56 +0100 |
commit | 04c30cd050238eb6a902a2ab9781c23b5afd1c67 (patch) | |
tree | ad5949d56bb53baa67d91e54ec54a30fc174b1c8 /git_deps/gitutils.py | |
parent | b4e3cd5b3588d29d2bb98ee619f443b24b32395f (diff) | |
parent | 095ccc5c927389eb6915caa17853d7bba90eb6b1 (diff) | |
download | git-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/gitutils.py')
-rw-r--r-- | git_deps/gitutils.py | 6 |
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): |