diff options
Diffstat (limited to 'Modules/rgbimgmodule.c')
-rw-r--r-- | Modules/rgbimgmodule.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c index 18d2776..36f6419 100644 --- a/Modules/rgbimgmodule.c +++ b/Modules/rgbimgmodule.c @@ -782,9 +782,7 @@ initrgbimg() PyObject *m, *d; m = Py_InitModule("rgbimg", rgbimg_methods); d = PyModule_GetDict(m); - ImgfileError = PyString_FromString("rgbimg.error"); - if (ImgfileError) + ImgfileError = PyErr_NewException("rgbimg.error", NULL, NULL); + if (ImgfileError != NULL) PyDict_SetItemString(d, "error", ImgfileError); - if (PyErr_Occurred()) - Py_FatalError("can't initialize rgbimg module"); } |