Staging
v0.5.1
https://github.com/python/cpython
Revision a1ade3e925836a89e1ebacb74eb8e81d85190cd8 authored by Andrew M. Kuchling on 05 October 2006, 17:24:08 UTC, committed by Andrew M. Kuchling on 05 October 2006, 17:24:08 UTC
If _stat_float_times is false, we will try to INCREF ival which could be NULL.
Return early in that case.  The caller checks for PyErr_Occurred so this
should be ok.

Klocwork #297
1 parent 165e797
Raw File
Tip revision: a1ade3e925836a89e1ebacb74eb8e81d85190cd8 authored by Andrew M. Kuchling on 05 October 2006, 17:24:08 UTC
[Backport r51223 | neal.norwitz]
Tip revision: a1ade3e
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