From 374358d219b5fc35b43f929cb285c3d3d473ac89 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 24 Sep 2009 13:05:36 +0300 Subject: [PATCH] Call generic python setattr if not scriptFd - yet more preliminaries for subtyping --- python/rpmts-py.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/rpmts-py.c b/python/rpmts-py.c index 22aeb20..348e2e8 100644 --- a/python/rpmts-py.c +++ b/python/rpmts-py.c @@ -996,6 +996,7 @@ static int rpmts_setattro(PyObject * o, PyObject * n, PyObject * v) char * name = PyString_AsString(n); int fdno; + /* XXX TODO: eliminate this hackery */ if (rstreq(name, "scriptFd")) { if (!PyArg_Parse(v, "i", &fdno)) return -1; if (fdno < 0) { @@ -1006,8 +1007,7 @@ static int rpmts_setattro(PyObject * o, PyObject * n, PyObject * v) rpmtsSetScriptFd(s->ts, s->scriptFd); } } else { - PyErr_SetString(PyExc_AttributeError, name); - return -1; + return PyObject_GenericSetAttr(o, n, v); } return 0; -- 2.7.4