summaryrefslogtreecommitdiffstats
path: root/Modules/resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/resource.c')
-rw-r--r--Modules/resource.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/resource.c b/Modules/resource.c
index 428c32c..9518ed6 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -201,7 +201,7 @@ void initresource()
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
- ResourceError = PyString_FromString("resource.error");
+ ResourceError = PyErr_NewException("resource.error", NULL, NULL);
PyDict_SetItemString(d, "error", ResourceError);
/* insert constants */
@@ -264,8 +264,4 @@ void initresource()
#ifdef RUSAGE_BOTH
ins(d, "RUSAGE_BOTH", RUSAGE_BOTH);
#endif
-
- /* Check for errors */
- if (PyErr_Occurred())
- Py_FatalError("can't initialize module resource");
}