Permalink
Browse files

Fixed #21049 -- Fixed autoreload for Python 3

Changed th system module values check to return a list.
In Python 3 it returns a dict_view which could occassionally produce
a runtime error of "dictionary changed size during iteration".
  • Loading branch information...
1 parent c7c19ac commit 559cb826b850faeb7ad198a3a78a38f07dcf3b42 @mburst mburst committed Sep 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/utils/autoreload.py
View
2 django/utils/autoreload.py
@@ -57,7 +57,7 @@
def code_changed():
global _mtimes, _win
filenames = []
- for m in sys.modules.values():
+ for m in list(sys.modules.values()):
try:
filenames.append(m.__file__)
except AttributeError:

0 comments on commit 559cb82

Please sign in to comment.