Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.

Commit 876e89a

Browse files
authored
backwards compatibility for default_sidebars
Tests appeared to start failing with my change. Realized that some test or users may be relying on the pre-1.6 default_sidebars behavior, threw in an EAFP.
1 parent a8e14a9 commit 876e89a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sphinxcontrib/versioning/sphinx_.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ def builder_inited(app):
5757

5858
# Add versions.html to sidebar.
5959
if '**' not in app.config.html_sidebars:
60-
app.config.html_sidebars['**'] = ['versions.html']
60+
try:
61+
app.config.html_sidebars['**'] = StandaloneHTMLBuilder.default_sidebars + ['versions.html']
62+
except AttributeError as e:
63+
app.config.html_sidebars['**'] = ['versions.html']
6164
elif 'versions.html' not in app.config.html_sidebars['**']:
6265
app.config.html_sidebars['**'].append('versions.html')
6366

0 commit comments

Comments
 (0)