From bf78ffe7f298c6e0691b611f25d80f610ce8e408 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 17 Dec 2024 08:45:14 +0530 Subject: [PATCH] Cleanup previous PR --- src/calibre/db/cli/cmd_set_metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/db/cli/cmd_set_metadata.py b/src/calibre/db/cli/cmd_set_metadata.py index f537d7f187..7724b152ee 100644 --- a/src/calibre/db/cli/cmd_set_metadata.py +++ b/src/calibre/db/cli/cmd_set_metadata.py @@ -160,7 +160,7 @@ def main(opts, args, dbctx): if field == 'sort': field = 'title_sort' if field not in fields: - raise SystemExit(_('{} is not a known field')) + raise SystemExit(_('{} is not a known field').format(field)) if field == 'cover': val = dbctx.path(os.path.abspath(os.path.expanduser(val))) else: @@ -173,7 +173,7 @@ def main(opts, args, dbctx): try: val = float(val) except Exception: - raise SystemExit('The value %r is not a valid series index' % val) + raise SystemExit(_('The value {!r} is not a valid series index').format(val)) fvals.append((field, val)) final_mi = dbctx.run('set_metadata', 'fields', book_id, fvals)