key.c: Only set the error code.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 24 Nov 2019 14:50:01 +0000 (14:50 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 27 Nov 2019 15:10:43 +0000 (15:10 +0000)
This briefly makes the error string unavailable, but only because the
actual constructor isn't wired up -- and if it were wired up then it
would fail immediately because it's programmed to accept only a single
argument.

key.c

diff --git a/key.c b/key.c
index dff59ec..997cf3c 100644 (file)
--- a/key.c
+++ b/key.c
@@ -104,7 +104,7 @@ static PyMethodDef keyexc_pymethods[] = {
 
 static void keyexc_raise(int err)
 {
-  PyObject *arg = Py_BuildValue("(is)", err, key_strerror(err));
+  PyObject *arg = Py_BuildValue("(i)", err);
   if (arg) PyErr_SetObject(keyexc, arg);
   Py_XDECREF(arg);
 }