mirror of https://github.com/django/django.git
[1.6.x] 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".
Backport of 559cb826b8
from master
This commit is contained in:
parent
2c73ba88f2
commit
92e89452f1
|
@ -57,7 +57,7 @@ _error_files = []
|
||||||
def code_changed():
|
def code_changed():
|
||||||
global _mtimes, _win
|
global _mtimes, _win
|
||||||
filenames = []
|
filenames = []
|
||||||
for m in sys.modules.values():
|
for m in list(sys.modules.values()):
|
||||||
try:
|
try:
|
||||||
filenames.append(m.__file__)
|
filenames.append(m.__file__)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
Loading…
Reference in New Issue