summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Burstein <mburst@maxburstein.com>2013-09-06 14:37:43 -0500
committerMax Burstein <mburst@maxburstein.com>2013-09-06 14:37:43 -0500
commit559cb826b850faeb7ad198a3a78a38f07dcf3b42 (patch)
tree3786d6be7675c55b4d140a1305f6426cdb319028
parentc7c19ac4080a533ef881b57e88e1efbc2882f7d2 (diff)
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".
-rw-r--r--django/utils/autoreload.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
index cc9cc1304a..6de15a2916 100644
--- a/django/utils/autoreload.py
+++ b/django/utils/autoreload.py
@@ -57,7 +57,7 @@ _error_files = []
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: