Ticket #2052: thread_stuff.diff

File thread_stuff.diff, 1.4 KB (added by scott@…, 18 years ago)

alterations to django/db/transaction.py, django/utils/autoreload.py, django/utils/_threading_local.py

  • django/db/transaction.py

     
    1212or implicit commits or rollbacks.
    1313"""
    1414
    15 import thread
     15try:
     16    import thread
     17except:
     18    import dummy_thread as thread
     19
    1620from django.db import connection
    1721from django.conf import settings
    1822
  • django/utils/autoreload.py

     
    2828# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2929# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    3030
    31 import os, sys, thread, time
     31import os, sys, time
    3232
     33try:
     34    import thread
     35except:
     36    import dummy_thread as thread
     37
    3338RUN_RELOADER = True
    3439
    3540def reloader_thread():
  • django/utils/_threading_local.py

     
    234234        return __del__
    235235    __del__ = __del__()
    236236
    237 from threading import currentThread, enumerate, RLock
     237try:
     238    from threading import currentThread, enumerate, RLock
     239except ImportError:
     240    from dummy_threading import currentThread, enumerate, RLock
     241
Back to Top