diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-10-25 02:01:10 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-10-25 02:01:10 +0000 |
| commit | 3ad82eff77ed2d30d74413a7b7cff006bbd8beb2 (patch) | |
| tree | 51785dc7da510657c09511939883b4dbbf33da8c /django | |
| parent | 5c3d1ec163ecbb6209965d1ea32fe4d380dcc9c6 (diff) | |
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
Diffstat (limited to 'django')
| -rw-r--r-- | django/utils/autoreload.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 039ba68cfb..04e319c1c7 100644 --- a/django/utils/autoreload.py +++ b/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 |
