mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-26 07:05:12 +01:00
...
This commit is contained in:
parent
6c3a168c1f
commit
7de5b6e166
1 changed files with 2 additions and 3 deletions
|
|
@ -171,10 +171,9 @@ def book_converted(self, job):
|
|||
raise Exception(_('Empty output file, '
|
||||
'probably the conversion process crashed'))
|
||||
|
||||
data = open(temp_files[-1].name, 'rb')
|
||||
self.gui.library_view.model().db.add_format(book_id, \
|
||||
with open(temp_files[-1].name, 'rb') as data:
|
||||
self.gui.library_view.model().db.add_format(book_id, \
|
||||
fmt, data, index_is_id=True)
|
||||
data.close()
|
||||
self.gui.status_bar.show_message(job.description + \
|
||||
(' completed'), 2000)
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Reference in a new issue