From 6eb891f57ad8b13bded1c7d0f4683cf63ba18c76 Mon Sep 17 00:00:00 2001 From: Tomasz Wysocki Date: Wed, 2 Apr 2014 17:26:34 +0200 Subject: [PATCH] Don't copy list for iteration. --- django/utils/autoreload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 119bebb148..94c74e582a 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -81,7 +81,7 @@ def gen_filenames(): Yields a generator over filenames referenced in sys.modules and translation files. """ - filenames = [filename.__file__ for filename in list(sys.modules.values()) + filenames = [filename.__file__ for filename in sys.modules.values() if hasattr(filename, '__file__')] if settings.USE_I18N: