mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Standalone ToC editor: Fix spurious error message if left open for more than two minutes
This commit is contained in:
parent
c81e84687d
commit
b9cd42edaa
@ -182,11 +182,11 @@ class ToCEditAction(InterfaceAction):
|
||||
else:
|
||||
db.new_api.add_format(job['book_id'], job['fmt'], path, run_hooks=False)
|
||||
retry_on_fail(os.remove, path)
|
||||
else:
|
||||
elif not job['started']:
|
||||
if monotonic() - job['start_time'] > 120:
|
||||
self.jobs.remove(job)
|
||||
error_dialog(self.gui, _('Failed to start editor'), _(
|
||||
'Could not edit: {}. The Table of Contents editor did not start in four minutes').format(job['title']), show=True)
|
||||
'Could not edit: {}. The Table of Contents editor did not start in two minutes').format(job['title']), show=True)
|
||||
continue
|
||||
if os.path.exists(started_path):
|
||||
job['started'] = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user