Skip to content

Commit 4d78f52

Browse files
authored
Merge pull request ceph#60987 from drunkard/main
doc: fixes in doc building
2 parents 14463aa + a54f571 commit 4d78f52

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

doc/_ext/ceph_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __init__(self, type, name,
9494
self.goodchars = goodchars
9595
self.positional = positional != 'false'
9696

97-
assert who == None
97+
assert who is None
9898

9999
def help(self):
100100
advanced = []

doc/conf.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def is_release_eol(codename):
7676
html_static_path = ["_static"]
7777
html_sidebars = {
7878
'**': ['smarttoc.html', 'searchbox.html']
79-
}
79+
}
8080

8181
html_css_files = ['css/custom.css']
8282

@@ -133,13 +133,23 @@ def is_release_eol(codename):
133133
'sphinxcontrib.mermaid',
134134
'sphinxcontrib.openapi',
135135
'sphinxcontrib.seqdiag',
136-
]
136+
]
137137

138138
ditaa = shutil.which("ditaa")
139139
if ditaa is not None:
140140
# in case we don't have binfmt_misc enabled or jar is not registered
141-
ditaa_args = ['-jar', ditaa]
142-
ditaa = 'java'
141+
_jar_paths = [
142+
'/usr/share/ditaa/lib/ditaa.jar', # Gentoo
143+
'/usr/share/ditaa/ditaa.jar', # deb
144+
'/usr/share/java/ditaa.jar', # rpm
145+
]
146+
_jar_paths = [p for p in _jar_paths if os.path.exists(p)]
147+
if _jar_paths:
148+
ditaa = 'java'
149+
ditaa_args = ['-jar', _jar_paths[0]]
150+
else:
151+
# keep ditaa from shutil.which
152+
ditaa_args = []
143153
extensions += ['sphinxcontrib.ditaa']
144154
else:
145155
extensions += ['plantweb.directive']

0 commit comments

Comments
 (0)