diff options
Diffstat (limited to 'qutebrowser/config/config.py')
-rw-r--r-- | qutebrowser/config/config.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index de210d50d..9235a984c 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -601,13 +601,13 @@ class ConfigContainer: pattern=self._pattern) @contextlib.contextmanager - def _handle_error(self, action: str, name: str) -> Iterator[None]: + def _handle_error(self, action: str) -> Iterator[None]: try: yield except configexc.Error as e: if self._configapi is None: raise - text = "While {} '{}'".format(action, name) + text = f"While {action}" self._configapi.errors.append(configexc.ConfigErrorDesc(text, e)) def _with_prefix(self, prefix: str) -> 'ConfigContainer': @@ -635,7 +635,7 @@ class ConfigContainer: if configdata.is_valid_prefix(name): return self._with_prefix(name) - with self._handle_error('getting', name): + with self._handle_error(f"getting '{name}'"): if self._configapi is None: # access from Python code return self._config.get(name) @@ -658,7 +658,7 @@ class ConfigContainer: return name = self._join(attr) - with self._handle_error('setting', name): + with self._handle_error(f"setting '{name}'"): self._config.set_obj(name, value, pattern=self._pattern) def _join(self, attr: str) -> str: |