[Python-checkins] python/dist/src/Lib/bsddb dbshelve.py,1.4,1.4.4.1

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Tue, 28 Jan 2003 07:34:22 -0800


Update of /cvsroot/python/python/dist/src/Lib/bsddb
In directory sc8-pr-cvs1:/tmp/cvs-serv24482

Modified Files:
      Tag: bsddb-bsddb3-schizo-branch
	dbshelve.py 
Log Message:
Add compatibility idiom, which tries to get bsddb.db first, falling
back to bsddb3.db


Index: dbshelve.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/dbshelve.py,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -C2 -d -r1.4 -r1.4.4.1
*** dbshelve.py	30 Dec 2002 20:52:07 -0000	1.4
--- dbshelve.py	28 Jan 2003 15:34:20 -0000	1.4.4.1
***************
*** 31,35 ****
  
  import cPickle
! from bsddb import db
  
  #------------------------------------------------------------------------
--- 31,40 ----
  
  import cPickle
! try:
!     # For Python 2.3
!     from bsddb import db
! except ImportError:
!     # For earlier Pythons w/distutils pybsddb
!     from bsddb3 import db
  
  #------------------------------------------------------------------------