Skip to content

Commit

Permalink
KeyError instead of IndexError.
Browse files Browse the repository at this point in the history
  • Loading branch information
rchateauneu committed Mar 6, 2021
1 parent eb5e025 commit 53164b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rdflib/plugins/stores/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def __add_triple_context(self, triple, context, quoted):
# we know the triple exists somewhere in the store
try:
triple_context = self.__tripleContexts[triple]
except IndexError:
except KeyError:
# triple exists with default ctx info
# start with a copy of the default ctx info
triple_context = self.__tripleContexts[triple] = self.__defaultContexts.copy()
Expand Down

0 comments on commit 53164b2

Please sign in to comment.