diff options
Diffstat (limited to 'git/objects/tree.py')
-rw-r--r-- | git/objects/tree.py | 4 |
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): |