diff options
author | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-04-29 22:43:58 +0900 |
---|---|---|
committer | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-04-29 22:43:58 +0900 |
commit | 49944cfa5229356f7b40a9ec232f11ca5c5393fa (patch) | |
tree | c9db81b469bd7befff1d753406b1292e5d0506fe /sphinx/domains/javascript.py | |
parent | ce4d342e20739ab994a451f367d5bce2c5edb5d2 (diff) | |
download | sphinx-git-49944cfa5229356f7b40a9ec232f11ca5c5393fa.tar.gz |
wrap iterator with list() to avoid 'dictionary changed size during iteration' on py3. refs #1350.
Diffstat (limited to 'sphinx/domains/javascript.py')
-rw-r--r-- | sphinx/domains/javascript.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py index 1f0ea1b55..8cc49b098 100644 --- a/sphinx/domains/javascript.py +++ b/sphinx/domains/javascript.py @@ -185,7 +185,7 @@ class JavaScriptDomain(Domain): } def clear_doc(self, docname): - for fullname, (fn, _) in self.data['objects'].items(): + for fullname, (fn, _) in list(self.data['objects'].items()): if fn == docname: del self.data['objects'][fullname] @@ -217,6 +217,6 @@ class JavaScriptDomain(Domain): name.replace('$', '_S_'), contnode, name) def get_objects(self): - for refname, (docname, type) in iteritems(self.data['objects']): + for refname, (docname, type) in list(self.data['objects'].items()): yield refname, refname, type, docname, \ refname.replace('$', '_S_'), 1 |