Staging
v0.5.1
https://github.com/python/cpython
Revision 4f3be8a0a908784f4ab5fec66439643f2c1d79eb authored by Neal Norwitz on 31 July 2008, 17:08:14 UTC, committed by Neal Norwitz on 31 July 2008, 17:08:14 UTC
1 parent 83ac014
Raw File
Tip revision: 4f3be8a0a908784f4ab5fec66439643f2c1d79eb authored by Neal Norwitz on 31 July 2008, 17:08:14 UTC
Security patches from Apple: prevent int overflow when allocating memory
Tip revision: 4f3be8a
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