Properly close database environment upon open failure
svn: r16618
This commit is contained in:
parent
5d97da751f
commit
d2a0f9fa23
@ -1008,7 +1008,8 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
Bail out if the incompatible version is discovered:
|
||||
* close cleanly to not damage data/env
|
||||
"""
|
||||
self.metadata.close()
|
||||
if hasattr(self, 'metadata') and self.metadata:
|
||||
self.metadata.close()
|
||||
self.env.close()
|
||||
self.metadata = None
|
||||
self.env = None
|
||||
|
Loading…
Reference in New Issue
Block a user