]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/conf.py: run ditaa with java 42577/head
authorKefu Chai <kchai@redhat.com>
Sun, 1 Aug 2021 17:41:47 +0000 (01:41 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 1 Aug 2021 17:42:08 +0000 (01:42 +0800)
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>
doc/conf.py

index f1123da387b1557a1abaf5f94ac2ba8e6ffb1452..b178c6aef12370bca9edaa5f3f2c69aa8212098d 100644 (file)
@@ -126,6 +126,9 @@ extensions = [
 
 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']