mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Handle HTML files containing only an image in html2lrf. Fixe regression that was causing jobs that failed in the GUI to be marked successfull
This commit is contained in:
parent
fdf4c4342f
commit
f7bf112ae2
@ -540,7 +540,7 @@ class HTMLConverter(object, LoggingInterface):
|
||||
return tb
|
||||
for page in list(self.book.pages()[index+1:]):
|
||||
for c in page.contents:
|
||||
if isinstance(c, (TextBlock, ImageBlock)):
|
||||
if isinstance(c, (TextBlock, ImageBlock, Canvas)):
|
||||
return c
|
||||
raise ConversionError(_('Could not parse file: %s')%self.file_name)
|
||||
|
||||
|
@ -466,7 +466,9 @@ class Overseer(object):
|
||||
self.job.update_status(percent, msg)
|
||||
elif word == 'ERROR':
|
||||
self.write('OK')
|
||||
self.job.excetion, self.job.traceback = cPickle.loads(msg)
|
||||
exception, traceback = cPickle.loads(msg)
|
||||
self.job.output(u'%s\n%s'%(exception, traceback))
|
||||
self.job.exception, self.job.traceback = exception, traceback
|
||||
return True
|
||||
else:
|
||||
self.terminate()
|
||||
@ -914,10 +916,11 @@ def worker(host, port):
|
||||
write(client_socket, 'RESULT:'+ cPickle.dumps(result))
|
||||
except BaseException, err:
|
||||
exception = (err.__class__.__name__, unicode(str(err), 'utf-8', 'replace'))
|
||||
tb = traceback.format_exc()
|
||||
tb = unicode(traceback.format_exc(), 'utf-8', 'replace')
|
||||
msg = 'ERROR:'+cPickle.dumps((exception, tb),-1)
|
||||
write(client_socket, msg)
|
||||
if read(client_socket, 10) != 'OK':
|
||||
res = read(client_socket, 10)
|
||||
if res != 'OK':
|
||||
break
|
||||
gc.collect()
|
||||
elif msg == 'PING:':
|
||||
|
Loading…
x
Reference in New Issue
Block a user