Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module,
[python/dscho.git] / Lib / dbhash.py
bloba5d5375ba943c2e6a75c5bc7df0c9ec2b12930ec
1 """Provide a (g)dbm-compatible interface to bsddb.hashopen."""
3 import sys
4 import warnings
5 warnings.warnpy3k("in 3.x, the dbhash module has been removed", stacklevel=2)
6 try:
7 import bsddb
8 except ImportError:
9 # prevent a second import of this module from spuriously succeeding
10 del sys.modules[__name__]
11 raise
13 __all__ = ["error","open"]
15 error = bsddb.error # Exported for anydbm
17 def open(file, flag = 'r', mode=0666):
18 return bsddb.hashopen(file, flag, mode)