Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improved autoreloader to ignore files that might be in eggs. Refs #596

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1010 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3ad82eff77ed2d30d74413a7b7cff006bbd8beb2 1 parent 5c3d1ec
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  django/utils/autoreload.py
View
2  django/utils/autoreload.py
@@ -37,6 +37,8 @@ def reloader_thread():
mtimes = {}
while RUN_RELOADER:
for filename in filter(lambda v: v, map(lambda m: getattr(m, "__file__", None), sys.modules.values())) + reloadFiles:
+ if not os.path.exists(filename):
+ continue # File might be in an egg, so it can't be reloaded.
if filename.endswith(".pyc"):
filename = filename[:-1]
mtime = os.stat(filename).st_mtime
Please sign in to comment.
Something went wrong with that request. Please try again.