mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add title of book to error message when failing to set PDF metadata
This commit is contained in:
parent
1ee5f3aba9
commit
c617a95672
@ -38,7 +38,7 @@ def set_metadata(stream, mi):
|
|||||||
mi.title, mi.authors, mi.book_producer, mi.tags, xmp_packet))
|
mi.title, mi.authors, mi.book_producer, mi.tags, xmp_packet))
|
||||||
touched = result['result']
|
touched = result['result']
|
||||||
except WorkerError as e:
|
except WorkerError as e:
|
||||||
raise Exception('Failed to set PDF metadata: %s'%e.orig_tb)
|
raise Exception('Failed to set PDF metadata in (%s): %s'%(mi.title, e.orig_tb))
|
||||||
if touched:
|
if touched:
|
||||||
with open(os.path.join(tdir, u'output.pdf'), 'rb') as f:
|
with open(os.path.join(tdir, u'output.pdf'), 'rb') as f:
|
||||||
f.seek(0, 2)
|
f.seek(0, 2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user