524 static PyObject *
525 DBusPythonString_tp_new(PyTypeObject *cls, PyObject *args, PyObject *kwargs)
526 {
527 PyObject *self;
528 long variantness = 0;
529 static char *argnames[] = {"variant_level", NULL};
530
531 if (PyTuple_Size(args) > 1) {
when PyTuple_Size() returns ob_size
when considering range: -0x8000000000000000 <= value <= 1
taking False path
532 PyErr_SetString(PyExc_TypeError,
533 "__new__ takes at most one positional parameter");
534 return NULL;
535 }
536 if (!PyArg_ParseTupleAndKeywords(dbus_py_empty_tuple, kwargs,
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
537 "|l:__new__", argnames,
538 &variantness)) return NULL;
539 if (variantness < 0) {
when considering range: 0 <= value <= 0x7fffffffffffffff
taking False path
540 PyErr_SetString(PyExc_ValueError,
541 "variant_level must be non-negative");
542 return NULL;
543 }
544
545 self = (NATIVESTR_TYPE.tp_new)(cls, args, NULL);
when call succeeds
546 if (self) {
taking True path
547 if (!dbus_py_variant_level_set(self, variantness)) {
when considering value == (dbus_bool_t)0 from abstract.c:547
taking True path
548 Py_CLEAR(self);
taking True path
when taking True path
549 return NULL;
550 }
551 }
552 return self;
553 }
returning (PyObject*)NULL without setting an exception
found 1 similar trace(s) to this