File: arm4module.c
Function: register_metric
Error: returning (PyObject*)NULL without setting an exception
3541 static PyObject *
3542 register_metric (PyObject *self, PyObject *args, PyObject *keywds)
3543 {
3544     arm_error_t status;
3545 	arm_id_t metric_id;
3546 	ArmID *app_id;
3547 	char *name;
3548     int format;
3549     int usage;
3550     char *units = NULL;
3551 
3552 	/*
3553 	 * Supported calling signatures:
3554 	 *	register_metric (app_id, "Name", format, usage, "units")
3555 	 */
3556 	static char *kwlist[] = {"app_id", "name", "format", "usage", "units", NULL};
3557 
3558 	if (!PyArg_ParseTupleAndKeywords(args, keywds, "Osii|s:register_metric", kwlist,
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
3559 			&app_id, &name, &format, &usage, &units))
3560         return NULL;
3561 	if (!ArmID_Object_Check(app_id))
when taking True path
when considering range: -0x80000000 <= value <= -1
taking False path
3562 		return NULL;
3563 
3564 	status = arm_register_metric(
3565 		&(app_id->arm_id),
3566 		name,
3567 		format,
3568 		usage,
3569 		units,
3570 		NULL,
3571 		0,
3572 		NULL, /* No sub-buffers defined */
3573 		&metric_id);
3574 	if (GETSTATE0->enableExceptions && (status != ARM_SUCCESS))
when considering range: -0x80000000 <= value <= -1
when considering range: -0x80000000 <= value <= -1
taking True path
3575 	{
3576 		set_arm_error (status, "arm_register_metric");
3577 		return NULL;
3578 	}
3579 
3580 	/* Return the transaction ID */
3581 	PyObject *id_ptr = (PyObject *) newArmID (&metric_id);
3582 	return id_ptr;
3583 }
returning (PyObject*)NULL without setting an exception
found 8 similar trace(s) to this