We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b653923 + d50b2e3 commit 88da5efCopy full SHA for 88da5ef
gitdb/db/loose.py
@@ -2,6 +2,8 @@
2
#
3
# This module is part of GitDB and is released under
4
# the New BSD License: https://opensource.org/license/bsd-3-clause/
5
+from contextlib import suppress
6
+
7
from gitdb.db.base import (
8
FileDBBase,
9
ObjectDBR,
@@ -90,10 +92,8 @@ def readable_db_object_path(self, hexsha):
90
92
"""
91
93
:return: readable object path to the object identified by hexsha
94
:raise BadObject: If the object file does not exist"""
- try:
95
+ with suppress(KeyError):
96
return self._hexsha_to_file[hexsha]
- except KeyError:
- pass
97
# END ignore cache misses
98
99
# try filesystem
0 commit comments