diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/mmapmodule.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index b77dda5..469c531 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -1326,7 +1326,10 @@ initmmap(void) dict = PyModule_GetDict(module); if (!dict) return; - mmap_module_error = PyExc_EnvironmentError; + mmap_module_error = PyErr_NewException("mmap.error", + PyExc_EnvironmentError , NULL); + if (mmap_module_error == NULL) + return; PyDict_SetItemString(dict, "error", mmap_module_error); PyDict_SetItemString(dict, "mmap", (PyObject*) &mmap_object_type); #ifdef PROT_EXEC |