diff options
author | Yobmod <yobmod@gmail.com> | 2021-08-08 21:42:34 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-08-08 21:42:34 +0100 |
commit | 38f5157253beb5801be80812e9b013a3cdd0bdc9 (patch) | |
tree | e75c305577966395857d15ff081beb9afe037828 /git/objects/commit.py | |
parent | 9d844a624b1cf207f0c379dc64f9b4767d89877d (diff) | |
download | gitpython-38f5157253beb5801be80812e9b013a3cdd0bdc9.tar.gz |
add type check to conf_encoding (in thoery could be bool or int)
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r-- | git/objects/commit.py | 2 |
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 |