just in case, otherwise we could have
File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/42577/lib/python3.8/site-packages/sphinxcontrib/ditaa.py", line 200, in html_visit_ditaa
render_ditaa_html(self, node, node['code'], node['options'])
File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/42577/lib/python3.8/site-packages/sphinxcontrib/ditaa.py", line 177, in render_ditaa_html
fname, outfn = render_ditaa(self, code, options, prefix)
File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/42577/lib/python3.8/site-packages/sphinxcontrib/ditaa.py", line 141, in render_ditaa
p = Popen(ditaa_args, stdout=PIPE, stdin=PIPE, stderr=PIPE)
File "/home/docs/.pyenv/versions/3.8.6/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/docs/.pyenv/versions/3.8.6/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/usr/bin/ditaa'
Signed-off-by: Kefu Chai <kchai@redhat.com>
ditaa = shutil.which("ditaa")
if ditaa is not None:
+ # in case we don't have binfmt_misc enabled or jar is not registered
+ ditaa_args = ['-jar', ditaa]
+ ditaa = 'java'
extensions += ['sphinxcontrib.ditaa']
else:
extensions += ['plantweb.directive']