summaryrefslogtreecommitdiffstats
path: root/Modules/audioop.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/audioop.c')
-rw-r--r--Modules/audioop.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/audioop.c b/Modules/audioop.c
index fc33bcd..c6d9df5 100644
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -1396,8 +1396,7 @@ initaudioop()
PyObject *m, *d;
m = Py_InitModule("audioop", audioop_methods);
d = PyModule_GetDict(m);
- AudioopError = PyString_FromString("audioop.error");
- if ( AudioopError == NULL
- || PyDict_SetItemString(d,"error",AudioopError) )
- Py_FatalError("can't define audioop.error");
+ AudioopError = PyErr_NewException("audioop.error", NULL, NULL);
+ if (AudioopError != NULL)
+ PyDict_SetItemString(d,"error",AudioopError);
}