diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-07-28 22:13:34 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-07-28 22:13:34 +0000 |
| commit | 1bf811e28dc33c1877fd45308f5736614778c226 (patch) | |
| tree | d6873b5437344c92f4f88e5eafd8eeb094a4f5f3 | |
| parent | 1cf552dcec0e8d1b4d5c27a900a9e28f34c12b40 (diff) | |
Fixed #2330 -- Added hack to stop KeyErrors from being thrown by the autoreloading development server if USE_I18N=False
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/utils/autoreload.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 6363af7835..e05b7fafe1 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -35,6 +35,14 @@ try: except ImportError: import dummy_thread as thread +# This import does nothing, but it's necessary to avoid some race conditions +# in the threading module. See http://code.djangoproject.com/ticket/2330 . +try: + import threading +except ImportError: + pass + + RUN_RELOADER = True def reloader_thread(): |
