diff options
author | Michael Stefaniuc <mstefani@winehq.org> | 2019-01-20 23:01:11 +0100 |
---|---|---|
committer | Michael Stefaniuc <mstefani@winehq.org> | 2019-01-20 23:01:11 +0100 |
commit | 095ccc5c927389eb6915caa17853d7bba90eb6b1 (patch) | |
tree | ad5949d56bb53baa67d91e54ec54a30fc174b1c8 | |
parent | b4e3cd5b3588d29d2bb98ee619f443b24b32395f (diff) | |
download | git-deps-095ccc5c927389eb6915caa17853d7bba90eb6b1.tar.gz |
Don't crash with commit messages that aren't valid utf-8
-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): |