From 14e876743dbe8e6b97bd6a02293eaaf7b7f9b444 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Sat, 1 Apr 2006 16:05:20 +0000 Subject: Bug 334318 – gtk.AboutDialog crashes with 'authors' parameter as string instead of list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gobject/gobjectmodule.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gobject') diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index 572d531..8024077 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -1721,8 +1721,8 @@ pyg_object_new (PyGObject *self, PyObject *args, PyObject *kwargs) if (pyg_param_gvalue_from_pyobject(¶ms[n_params].value, value, pspec) < 0) { PyErr_Format(PyExc_TypeError, - "could not convert value for property `%s'", - key_str); + "could not convert value for property `%s' from %s to %s", + key_str, value->ob_type->tp_name, g_type_name(G_PARAM_SPEC_VALUE_TYPE(pspec))); goto cleanup; } params[n_params].name = g_strdup(key_str); @@ -2682,7 +2682,9 @@ _pyg_strv_to_gvalue(GValue *value, PyObject *obj) int argc, i; gchar **argv; - if (!PySequence_Check(obj)) return -1; + if (!(PyTuple_Check(obj) || PyList_Check(obj))) + return -1; + argc = PySequence_Length(obj); for (i = 0; i < argc; ++i) if (!PyString_Check(PySequence_Fast_GET_ITEM(obj, i))) -- cgit