Kaydet (Commit) 2c627c44 authored tarafından Gregory P. Smith's avatar Gregory P. Smith

simplify some import statements and clean up a docstring and BerkeleyDB library

version check to mention that we support versions 3.2 - 4.2.
üst c52e257e
......@@ -33,7 +33,7 @@
#----------------------------------------------------------------------
"""Support for BerkeleyDB 3.1 through 4.1.
"""Support for BerkeleyDB 3.2 through 4.2.
"""
try:
......
......@@ -40,5 +40,5 @@
from _bsddb import *
from _bsddb import __version__
if version() < (3, 1, 0):
raise ImportError, "BerkeleyDB 3.x symbols not found. Perhaps python was statically linked with an older version?"
if version() < (3, 2, 0):
raise ImportError, "correct BerkeleyDB symbols not found. Perhaps python was statically linked with an older version?"
......@@ -35,12 +35,7 @@ try:
except ImportError:
# DictMixin is new in Python 2.3
class DictMixin: pass
try:
# For Python 2.3
from bsddb import db
except ImportError:
# For earlier Pythons w/distutils pybsddb
from bsddb3 import db
import db
#------------------------------------------------------------------------
......
......@@ -26,12 +26,7 @@
#
from time import sleep as _sleep
try:
# For Python 2.3
from bsddb import db
except ImportError:
# For earlier Pythons w/distutils pybsddb
from bsddb3 import db
import db
# always sleep at least N seconds between retrys
_deadlock_MinSleepTime = 1.0/64
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment