mirror of
https://github.com/python/cpython.git
synced 2025-01-25 02:24:25 +08:00
In class bsdTableDB, add class variables db and env (set to None) to
prevent close() called from __del__ from bombing out when __init__() fails early.
This commit is contained in:
parent
0d366b1418
commit
7a98e8083c
@ -113,6 +113,11 @@ def contains_metastrings(s) :
|
||||
|
||||
|
||||
class bsdTableDB :
|
||||
|
||||
# Save close() from bombing out if __init__() failed
|
||||
db = None
|
||||
env = None
|
||||
|
||||
def __init__(self, filename, dbhome, create=0, truncate=0, mode=0600, recover=0, dbflags=0) :
|
||||
"""bsdTableDB.open(filename, dbhome, create=0, truncate=0, mode=0600)
|
||||
Open database name in the dbhome BerkeleyDB directory.
|
||||
|
Loading…
Reference in New Issue
Block a user