mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More intelligent error message when pdftohtml not found
This commit is contained in:
parent
059041ebdf
commit
26afd4b2db
@ -34,7 +34,13 @@ def generate_html(pathtopdf, logger):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
os.chdir(tdir)
|
os.chdir(tdir)
|
||||||
p = popen(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
|
try:
|
||||||
|
p = popen(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||||
|
except OSError, err:
|
||||||
|
if err.errno == 2:
|
||||||
|
raise ConversionError(_('Could not find pdftohtml, check it is in your PATH'))
|
||||||
|
else:
|
||||||
|
raise
|
||||||
logger.info(p.stdout.read())
|
logger.info(p.stdout.read())
|
||||||
ret = p.wait()
|
ret = p.wait()
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user