summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_replication.py
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2008-08-31 14:00:51 (GMT)
committerJesus Cea <jcea@jcea.es>2008-08-31 14:00:51 (GMT)
commit4907d27c1fcc7bd990715d3023932433076e152f (patch)
treef7e79e00d3e95785b6ff3d2d0b809e6d6e5e5779 /Lib/bsddb/test/test_replication.py
parent82358691f77e33301df2916746474873b35ccafa (diff)
downloadcpython-4907d27c1fcc7bd990715d3023932433076e152f.zip
cpython-4907d27c1fcc7bd990715d3023932433076e152f.tar.gz
cpython-4907d27c1fcc7bd990715d3023932433076e152f.tar.bz2
Update bsddb code to version 4.7.3pre2. This code should
be compatible with Python 3.0, also. http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.7.3
Diffstat (limited to 'Lib/bsddb/test/test_replication.py')
-rw-r--r--Lib/bsddb/test/test_replication.py31
1 files changed, 14 insertions, 17 deletions
diff --git a/Lib/bsddb/test/test_replication.py b/Lib/bsddb/test/test_replication.py
index 5d01b31..79df974 100644
--- a/Lib/bsddb/test/test_replication.py
+++ b/Lib/bsddb/test/test_replication.py
@@ -5,21 +5,9 @@ import os
import time
import unittest
-try:
- # For Pythons w/distutils pybsddb
- from bsddb3 import db
-except ImportError:
- # For Python 2.3
- from bsddb import db
+from test_all import db, test_support, have_threads, verbose, \
+ get_new_environment_path, get_new_database_path
-from test_all import have_threads, get_new_environment_path, get_new_database_path
-
-try:
- from bsddb3 import test_support
-except ImportError:
- from test import test_support
-
-from test_all import verbose
#----------------------------------------------------------------------
@@ -254,9 +242,14 @@ class DBBaseReplication(DBReplicationManager):
from threading import Thread
t_m=Thread(target=thread_master)
- t_m.setDaemon(True)
t_c=Thread(target=thread_client)
- t_c.setDaemon(True)
+ import sys
+ if sys.version_info[0] < 3 :
+ t_m.setDaemon(True)
+ t_c.setDaemon(True)
+ else :
+ t_m.daemon = True
+ t_c.daemon = True
self.t_m = t_m
self.t_c = t_c
@@ -400,7 +393,11 @@ class DBBaseReplication(DBReplicationManager):
from threading import Thread
election_status[0] = True
t=Thread(target=elect)
- t.setDaemon(True)
+ import sys
+ if sys.version_info[0] < 3 :
+ t.setDaemon(True)
+ else :
+ t.daemon = True
t.start()
self.thread_do = thread_do