static PyObject* File_get_path(FileObject* self) {
const char* path = pakfire_file_get_path(self->file);
+ if (!path)
+ Py_RETURN_NONE;
return PyUnicode_FromString(path);
}
static PyObject* File_get_uname(FileObject* self) {
const char* uname = pakfire_file_get_uname(self->file);
+ if (!uname)
+ Py_RETURN_NONE;
return PyUnicode_FromString(uname);
}
static PyObject* File_get_gname(FileObject* self) {
const char* gname = pakfire_file_get_gname(self->file);
+ if (!gname)
+ Py_RETURN_NONE;
return PyUnicode_FromString(gname);
}
static PyObject* File_get_mimetype(FileObject* self) {
const char* mimetype = pakfire_file_get_mimetype(self->file);
+ if (!mimetype)
+ Py_RETURN_NONE;
return PyUnicode_FromString(mimetype);
}