aboutsummaryrefslogtreecommitdiffstats
path: root/config_file/parsers/ini_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'config_file/parsers/ini_parser.py')
-rw-r--r--config_file/parsers/ini_parser.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/config_file/parsers/ini_parser.py b/config_file/parsers/ini_parser.py
index 81f2d1b..31b0dcf 100644
--- a/config_file/parsers/ini_parser.py
+++ b/config_file/parsers/ini_parser.py
@@ -1,9 +1,10 @@
import configparser
from io import StringIO
-from config_file.parsers.base_parser import BaseParser, ParsingError
+from config_file.parsers.base_parser import BaseParser
from config_file.parsers.parse_value import parse_value
from config_file.utils import split_on_dot
+from config_file.exceptions import ParsingError
class IniParser(BaseParser):
@@ -95,7 +96,7 @@ class IniParser(BaseParser):
if "." not in section_key:
if not self.parsed_content.has_section(section_key):
raise ValueError(
- f"Cannot delete {section_key} because it is not in the config file."
+ "Cannot delete {} because it is not in the config file.".format(section_key)
)
self.parsed_content.remove_section(section_key)
@@ -104,7 +105,7 @@ class IniParser(BaseParser):
section, key = split_on_dot(section_key, only_last_dot=True)
if key not in self.parsed_content[section]:
raise ValueError(
- f"Cannot delete {section}.{key} because {key} is not in {section}."
+ "Cannot delete {section}.{key} because {key} is not in {section}.".format(section = section, key = key)
)
self.parsed_content.remove_option(section, key)