mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Make db modules' error classes inherit IOError.
Stop dbm from importing every dbm module when imported.
This commit is contained in:
parent
e81f5ef1eb
commit
b17acad68e
5 changed files with 50 additions and 51 deletions
|
@ -4,7 +4,8 @@ import bsddb
|
|||
|
||||
__all__ = ["error", "open"]
|
||||
|
||||
error = bsddb.error
|
||||
class error(bsddb.error, IOError):
|
||||
pass
|
||||
|
||||
def open(file, flag = 'r', mode=0o666):
|
||||
return bsddb.hashopen(file, flag, mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue