From what I could see there's three places external tools are used. All of them use the sh module but do it differently:
The pdf and git packages just import rst2pdf/git from sh and thus make waliki fail with and ImportError if the tool is not available.
The pdf plugin actually monkey-patches the undocumented _path attribute of the sh.Command instance. But doing that in the view is too late to actually make a difference to the ImportError. And it's a hack, of course.
The slides plugin wraps the import in a try: ... catch ImportErrror: ... and sets hovercraft = None if import fails. But since the plugin's view does then call hovercraft without checking this just turns a loadtime error into a runtime error.
Here's a patch that introduces consistency and allows changing the tool path's through settings.
Coverage decreased (-0.03%) to 74.969% when pulling 3bc6d398a1dc186246855f467b1b27cf3d20b297 on wagnerflo:commands into b7db696075ceebb5676be61f44e2d806cc472255 on mgaitan:master.
From what I could see there's three places external tools are used. All of them use the
sh
module but do it differently:pdf
andgit
packages justimport rst2pdf/git from sh
and thus make waliki fail with andImportError
if the tool is not available.pdf
plugin actually monkey-patches the undocumented_path
attribute of thesh.Command
instance. But doing that in the view is too late to actually make a difference to theImportError
. And it's a hack, of course.slides
plugin wraps the import in atry: ... catch ImportErrror: ...
and setshovercraft = None
if import fails. But since the plugin's view does then callhovercraft
without checking this just turns a loadtime error into a runtime error.Here's a patch that introduces consistency and allows changing the tool path's through settings.