1
0
mirror of https://github.com/django/django.git synced 2025-03-26 17:20:49 +00:00

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".
This commit is contained in:
Max Burstein 2013-09-06 14:37:43 -05:00
parent c7c19ac408
commit 559cb826b8

View File

@ -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: