summaryrefslogtreecommitdiff
path: root/git/objects/commit.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r--git/objects/commit.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py
index b689167f..b36cd46d 100644
--- a/git/objects/commit.py
+++ b/git/objects/commit.py
@@ -446,6 +446,8 @@ class Commit(base.Object, TraversableIterableObj, Diffable, Serializable):
# assume utf8 encoding
enc_section, enc_option = cls.conf_encoding.split('.')
conf_encoding = cr.get_value(enc_section, enc_option, cls.default_encoding)
+ if not isinstance(conf_encoding, str):
+ raise TypeError("conf_encoding could not be coerced to str")
# if the tree is no object, make sure we create one - otherwise
# the created commit object is invalid