mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Cleanup previous PR
This commit is contained in:
parent
58685d5260
commit
bf78ffe7f2
@ -160,7 +160,7 @@ def main(opts, args, dbctx):
|
|||||||
if field == 'sort':
|
if field == 'sort':
|
||||||
field = 'title_sort'
|
field = 'title_sort'
|
||||||
if field not in fields:
|
if field not in fields:
|
||||||
raise SystemExit(_('{} is not a known field'))
|
raise SystemExit(_('{} is not a known field').format(field))
|
||||||
if field == 'cover':
|
if field == 'cover':
|
||||||
val = dbctx.path(os.path.abspath(os.path.expanduser(val)))
|
val = dbctx.path(os.path.abspath(os.path.expanduser(val)))
|
||||||
else:
|
else:
|
||||||
@ -173,7 +173,7 @@ def main(opts, args, dbctx):
|
|||||||
try:
|
try:
|
||||||
val = float(val)
|
val = float(val)
|
||||||
except Exception:
|
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))
|
fvals.append((field, val))
|
||||||
|
|
||||||
final_mi = dbctx.run('set_metadata', 'fields', book_id, fvals)
|
final_mi = dbctx.run('set_metadata', 'fields', book_id, fvals)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user