From 836cefe45633331d0e5692295174bf3181a5e365 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Thu, 6 Aug 2020 09:47:35 -0500 Subject: Change MissingKeyErrors to KeyError --- config_file/base_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config_file/base_parser.py') diff --git a/config_file/base_parser.py b/config_file/base_parser.py index a987a55..a440dcb 100644 --- a/config_file/base_parser.py +++ b/config_file/base_parser.py @@ -2,7 +2,7 @@ from types import ModuleType from typing import Any, Type from config_file.abstract_parser import AbstractParser -from config_file.exceptions import MissingKeyError, ParsingError +from config_file.exceptions import ParsingError from config_file.nested_lookup import get_occurrence_of_key from config_file.utils import split_on_dot @@ -123,7 +123,7 @@ class BaseParser(AbstractParser): content_reference = content_reference[key] except (KeyError, TypeError): - raise MissingKeyError(f"The specified key '{key}' to delete was not found.") + raise KeyError(f"The specified key '{key}' to delete was not found.") def stringify(self) -> str: return self.__module.dumps(self.parsed_content) -- cgit v1.2.3