Merge pull request #8939 from tk0miya/8938_imgconverter_show_OSError

Fix #8938: imgconverter: Show the error of the command availability check
This commit is contained in:
Takeshi KOMIYA 2021-02-28 12:57:32 +09:00 committed by GitHub
commit 6ca7c1c579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -64,6 +64,7 @@ Features added
* #2018: html: :confval:`html_favicon` and :confval:`html_logo` now accept URL
for the image
* #8070: html search: Support searching for 2characters word
* #8938: imgconverter: Show the error of the command availability check
* #7830: Add debug logs for change detection of sources and templates
* #8201: Emit a warning if toctree contains duplicated entries

View File

@ -37,10 +37,10 @@ class ImagemagickConverter(ImageConverter):
logger.debug('Invoking %r ...', args)
subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True)
return True
except OSError:
except OSError as exc:
logger.warning(__('convert command %r cannot be run, '
'check the image_converter setting'),
self.config.image_converter)
'check the image_converter setting: %s'),
self.config.image_converter, exc)
return False
except CalledProcessError as exc:
logger.warning(__('convert exited with error:\n'