From 4dfa8a75c02c689746748cc1af9a7bdd05bf2e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 9 Jul 2025 22:57:38 +0200 Subject: [PATCH] update InputFileError constructor calls --- gallery_dl/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 12c590be..c79d6276 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -476,16 +476,15 @@ class InputManager(): key, sep, value = line.partition("=") if not sep: raise exception.InputFileError( - "Invalid KEY=VALUE pair '%s' on line %s in %s", - line, n+1, path) + f"Invalid KEY=VALUE pair '{line}' " + f"on line {n+1} in {path}") try: value = util.json_loads(value.strip()) except ValueError as exc: self.log.debug("%s: %s", exc.__class__.__name__, exc) raise exception.InputFileError( - "Unable to parse '%s' on line %s in %s", - value, n+1, path) + f"Unable to parse '{value}' on line {n+1} in {path}") key = key.strip().split(".") conf.append((key[:-1], key[-1], value))