Skip to content

Commit 5eaf948

Browse files
committed
Make a copy of the iterator to avoid "OrderedDict mutated" error
Closes readthedocs#19
1 parent dbc8815 commit 5eaf948

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hoverxref/extension.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def setup_sphinx_tabs(app, config):
7676
Sphinx Tabs removes the CSS/JS from pages that does not use the directive.
7777
Although, we need them to use inside the tooltip.
7878
"""
79-
for listener_id, function in app.events.listeners.get('html-page-context').items():
79+
listeners = list(app.events.listeners.get('html-page-context').items())
80+
for listener_id, function in listeners:
8081
module_name = inspect.getmodule(function).__name__
8182
if module_name == 'sphinx_tabs.tabs':
8283
app.disconnect(listener_id)

0 commit comments

Comments
 (0)