This commit is contained in:
Kovid Goyal 2021-10-23 10:44:46 +05:30
parent 9a295fad07
commit be73536c26
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -46,7 +46,7 @@ def main(opts, args, dbctx):
book_id = int(args[0]) book_id = int(args[0])
mi = dbctx.run('show_metadata', book_id) mi = dbctx.run('show_metadata', book_id)
if mi is None: if mi is None:
raise SystemExit('Id #%d is not present in database.' % id) raise SystemExit(f'Id #{book_id} is not present in database.')
if opts.as_opf: if opts.as_opf:
stdout = getattr(sys.stdout, 'buffer', sys.stdout) stdout = getattr(sys.stdout, 'buffer', sys.stdout)
mi = OPFCreator(os.getcwd(), mi) mi = OPFCreator(os.getcwd(), mi)