summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_bsddb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index c3d3415055..b3e33c5e9d 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -5991,6 +5991,10 @@ PyMODINIT_FUNC init_bsddb(void)
* from both DBError and KeyError, since the API only supports
* using one base class. */
PyDict_SetItemString(d, "KeyError", PyExc_KeyError);
+ {
+ PyObject *builtin_mod = PyImport_ImportModule("__builtin__");
+ PyDict_SetItemString(d, "__builtins__", builtin_mod);
+ }
PyRun_String("class DBNotFoundError(DBError, KeyError): pass\n"
"class DBKeyEmptyError(DBError, KeyError): pass",
Py_file_input, d, d);