diff options
| author | Facundo Batista <facundobatista@gmail.com> | 2008-02-17 18:59:29 +0000 |
|---|---|---|
| committer | Facundo Batista <facundobatista@gmail.com> | 2008-02-17 18:59:29 +0000 |
| commit | e139688d34cc12b23d3a310f10d4f440f75f7d08 (patch) | |
| tree | 490a12e1246ba8a0aea3b92b9bd4fc8633965480 /Modules | |
| parent | f88a077f69892c80e1ecf0ac8c0ba3d981dc4ff8 (diff) | |
| download | cpython-git-e139688d34cc12b23d3a310f10d4f440f75f7d08.tar.gz | |
Issue 2112. mmap does not raises EnvironmentError no more, but
a subclass of it. Thanks John Lenton.
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 e47211f171..c71d8402cb 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -1402,7 +1402,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 |
