mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 14:14:03 +02:00
More intelligent error message when pdftohtml not found
This commit is contained in:
parent
059041ebdf
commit
26afd4b2db
1 changed files with 7 additions and 1 deletions
|
|
@ -34,7 +34,13 @@ def generate_html(pathtopdf, logger):
|
|||
|
||||
try:
|
||||
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())
|
||||
ret = p.wait()
|
||||
if ret != 0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue