]> sigrok.org Git - libsigrokdecode.git/commitdiff
Properly return error on exception in srd_inst_option_set()
authorBert Vermeulen <redacted>
Wed, 16 Oct 2013 09:10:27 +0000 (11:10 +0200)
committerBert Vermeulen <redacted>
Wed, 16 Oct 2013 10:04:16 +0000 (12:04 +0200)
controller.c

index c6347c0a93b3d7f826ce1172a1d6413d6ec381a9..672ac93258b67d8c8317c9508ae581c337f302a4 100644 (file)
@@ -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;
 }