docs: cdomain.py: get rid of a warning since version 1.8

There's a new warning about a deprecation function. Add a
logic at cdomain.py to avoid that.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
Mauro Carvalho Chehab 2019-05-23 07:43:43 -03:00 committed by Jonathan Corbet
parent b0d60bfbb6
commit 42f6ebd827
1 changed files with 4 additions and 1 deletions

View File

@ -48,7 +48,10 @@ major, minor, patch = sphinx.version_info[:3]
def setup(app):
app.override_domain(CDomain)
if (major == 1 and minor < 8):
app.override_domain(CDomain)
else:
app.add_domain(CDomain, override=True)
return dict(
version = __version__,