Staging
v0.5.1
https://github.com/python/cpython
Revision 5ed4997e1f3eb0a849e6f97fed9c9830bf8e0f6f authored by Neal Norwitz on 13 August 2006, 18:41:15 UTC, committed by Neal Norwitz on 13 August 2006, 18:41:15 UTC
1 parent 93bf902
Raw File
Tip revision: 5ed4997e1f3eb0a849e6f97fed9c9830bf8e0f6f authored by Neal Norwitz on 13 August 2006, 18:41:15 UTC
Get rid of compiler warning
Tip revision: 5ed4997
dbhash.py
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""

import sys
try:
    import bsddb
except ImportError:
    # prevent a second import of this module from spuriously succeeding
    del sys.modules[__name__]
    raise

__all__ = ["error","open"]

error = bsddb.error                     # Exported for anydbm

def open(file, flag = 'r', mode=0666):
    return bsddb.hashopen(file, flag, mode)
back to top