733 static PyObject *
734 xattr_remove(PyObject *self, PyObject *args, PyObject *keywds)
735 {
736 PyObject *myarg, *res;
737 int nofollow = 0;
738 char *attrname = NULL, *name_buf;
739 char *ns = NULL;
740 const char *full_name;
741 int nret;
742 target_t tgt;
743 static char *kwlist[] = {"item", "name", "nofollow", "namespace", NULL};
744
745 /* Parse the arguments */
746 if (!PyArg_ParseTupleAndKeywords(args, keywds, "Oet|iz", kwlist,
when _PyArg_ParseTupleAndKeywords_SizeT() succeeds
taking False path
747 &myarg, NULL, &attrname, &nofollow, &ns))
748 return NULL;
749
750 if(!convertObj(myarg, &tgt, nofollow)) {
when considering range: -0x80000000 <= value <= -1
taking False path
751 res = NULL;
752 goto freearg;
753 }
754
755 full_name = merge_ns(ns, attrname, &name_buf);
756 if(full_name == NULL) {
when treating unknown const char * from xattr.c:755 as NULL
taking True path
757 res = NULL;
758 goto freearg;
759 }
760
761 /* Remove the attribute */
762 nret = _remove_obj(&tgt, full_name);
763
764 PyMem_Free(name_buf);
765
766 free_tgt(&tgt);
767
768 if(nret == -1) {
769 res = PyErr_SetFromErrno(PyExc_IOError);
770 goto freearg;
771 }
772
773 Py_INCREF(Py_None);
774 res = Py_None;
775
776 freearg:
777 PyMem_Free(attrname);
778
779 /* Return the result */
780 return res;
781 }
returning (PyObject*)NULL without setting an exception
found 2 similar trace(s) to this