Commit 7a98e808 authored by Guido van Rossum's avatar Guido van Rossum

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.
parent 0d366b14
...@@ -113,6 +113,11 @@ def contains_metastrings(s) : ...@@ -113,6 +113,11 @@ def contains_metastrings(s) :
class bsdTableDB : 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) : 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) """bsdTableDB.open(filename, dbhome, create=0, truncate=0, mode=0600)
Open database name in the dbhome BerkeleyDB directory. Open database name in the dbhome BerkeleyDB directory.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment