diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-06-01 04:57:10 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-06-01 04:57:10 +0000 |
| commit | 56131d0fb9a1a99577c3866ac63fa0cb8c779cbd (patch) | |
| tree | 6df419f2fe7871b6445e81349b7bb18b0817409a | |
| parent | b4be0d2487532766a8709c0333e63ecbee96427d (diff) | |
Fixed #2052 -- Fixed some threading issues for FreeBSD. Thanks, scott@clued-in.co.uk
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/transaction.py | 5 | ||||
| -rw-r--r-- | django/utils/_threading_local.py | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/django/db/transaction.py b/django/db/transaction.py index 906995ca02..60a743c42a 100644 --- a/django/db/transaction.py +++ b/django/db/transaction.py @@ -12,7 +12,10 @@ Managed transactions don't do those commits, but will need some kind of manual or implicit commits or rollbacks. """ -import thread +try: + import thread +except ImportError: + import dummy_thread as thread from django.db import connection from django.conf import settings diff --git a/django/utils/_threading_local.py b/django/utils/_threading_local.py index 90717a8d84..bf9a25753a 100644 --- a/django/utils/_threading_local.py +++ b/django/utils/_threading_local.py @@ -234,4 +234,7 @@ class local(_localbase): return __del__ __del__ = __del__() -from threading import currentThread, enumerate, RLock +try: + from threading import currentThread, enumerate, RLock +except ImportError: + from dummy_threading import currentThread, enumerate, RLock |
