summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2013-10-16 11:10:27 +0200
committerBert Vermeulen <bert@biot.com>2013-10-16 12:04:16 +0200
commit7fc7bde666b3c1234e3d9612caa0388381881059 (patch)
tree05b7b17584282a31cda3a34aded158fc882ddb4d
parent32cfb920625182c03eb4a4564ffdfa9d2b08f15c (diff)
downloadlibsigrokdecode-7fc7bde666b3c1234e3d9612caa0388381881059.tar.gz
libsigrokdecode-7fc7bde666b3c1234e3d9612caa0388381881059.zip
Properly return error on exception in srd_inst_option_set()
-rw-r--r--controller.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/controller.c b/controller.c
index c6347c0..672ac93 100644
--- a/controller.c
+++ b/controller.c
@@ -412,8 +412,10 @@ err_out:
Py_XDECREF(py_dec_optkeys);
Py_XDECREF(py_dec_options);
g_free(key);
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
srd_exception_catch("Stray exception in srd_inst_option_set().");
+ ret = SRD_ERR_PYTHON;
+ }
return ret;
}