638 static PyObject *
639 urj_pyc_add_instruction (urj_pychain_t *self, PyObject *args)
640 {
641 char *instname;
642 char *code;
643 char *regname;
644 urj_part_t *part;
645 urj_chain_t *urc = self->urchain;
646
647 if (!PyArg_ParseTuple (args, "sss", &instname, &code, ®name))
when PyArg_ParseTuple() succeeds
taking False path
648 return NULL;
649 if (!urj_pyc_precheck (urc, UPRC_CBL|UPRC_DET))
when considering value == (int)0 from chain.c:649
taking True path
650 return NULL;
651 part = urj_tap_chain_active_part (urc);
652
653 if (part == NULL)
654 {
655 if (urj_error_get ())
656 {
657 PyErr_SetString (UrjtagError, urj_error_describe ());
658 urj_error_reset ();
659 }
660 else
661 PyErr_SetString (UrjtagError,
662 _("liburjtag BUG: unknown urjtag error"));
663 return NULL;
664 }
665
666 if (urj_part_instruction_define (part, instname, code, regname) == NULL)
667 return urj_py_chkret (URJ_STATUS_FAIL);
668 else
669 return Py_BuildValue ("");
670 }
returning (PyObject*)NULL without setting an exception