summaryrefslogtreecommitdiff
path: root/git/objects/tree.py
diff options
context:
space:
mode:
authorRam Rachum <ram@rachum.com>2020-06-13 23:29:59 +0300
committerSebastian Thiel <sebastian.thiel@icloud.com>2020-06-14 08:30:09 +0800
commit411635f78229cdec26167652d44434bf8aa309ab (patch)
tree1e301ce6bdd458d4db20c993695bb763d1b9d158 /git/objects/tree.py
parent99ba753b837faab0509728ee455507f1a682b471 (diff)
downloadgitpython-411635f78229cdec26167652d44434bf8aa309ab.tar.gz
Fix exception causes all over the codebase
Diffstat (limited to 'git/objects/tree.py')
-rw-r--r--git/objects/tree.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/objects/tree.py b/git/objects/tree.py
index 469e5395..68e98329 100644
--- a/git/objects/tree.py
+++ b/git/objects/tree.py
@@ -203,8 +203,8 @@ class Tree(IndexObject, diff.Diffable, util.Traversable, util.Serializable):
path = join_path(self.path, name)
try:
yield self._map_id_to_type[mode >> 12](self.repo, binsha, mode, path)
- except KeyError:
- raise TypeError("Unknown mode %o found in tree data for path '%s'" % (mode, path))
+ except KeyError as e:
+ raise TypeError("Unknown mode %o found in tree data for path '%s'" % (mode, path)) from e
# END for each item
def join(self, file):