diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-09-29 16:44:41 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-09-29 16:44:41 +0000 |
| commit | 3d5abd63531d388ad02bfb454decadad18b32fb0 (patch) | |
| tree | 78053d5b692380422c2acc3f6b24571f4264b216 /lib/gui/elistboxcontent.cpp | |
| parent | 2acb465616ee1e910b345a0c5e9ec7429daf9f90 (diff) | |
| download | enigma2-3d5abd63531d388ad02bfb454decadad18b32fb0.tar.gz enigma2-3d5abd63531d388ad02bfb454decadad18b32fb0.zip | |
eListboxPythonConfigContent: handle AnwenderFehler more gracefully
Diffstat (limited to 'lib/gui/elistboxcontent.cpp')
| -rw-r--r-- | lib/gui/elistboxcontent.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index f804ee0e..f94765ef 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -428,13 +428,16 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, /* CallObject will call __call__ which should return the value tuple */ value = PyObject_CallObject(value, args); + + if (PyErr_Occurred()) + PyErr_Print(); Py_DECREF(args); /* the PyInt was stolen. */ } /* check if this is really a tuple */ - if (PyTuple_Check(value)) + if (value && PyTuple_Check(value)) { /* convert type to string */ PyObject *type = PyTuple_GetItem(value, 0); @@ -513,7 +516,8 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, } } Py_XDECREF(type); - } + } else + eWarning("eListboxPythonConfigContent: second value of tuple is not a tuple."); /* value is borrowed */ } |
