return r;
}
+static PyObject* _pakfire_set_cache_path(PyObject* self, PyObject* args) {
+ const char* path = NULL;
+ int r;
+
+ if (!PyArg_ParseTuple(args, "s", &path))
+ return NULL;
+
+ // Set the cache path
+ r = pakfire_ctx_set_cache_path(pakfire_ctx, path);
+ if (r) {
+ errno = -r;
+ PyErr_SetFromErrno(PyExc_OSError);
+
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
static PyObject* _pakfire_set_log_level(PyObject* self, PyObject* args) {
int level = 0;
}
static PyMethodDef pakfireModuleMethods[] = {
+ {
+ "set_cache_path",
+ (PyCFunction)_pakfire_set_cache_path,
+ METH_VARARGS,
+ NULL,
+ },
{
"set_log_level",
(PyCFunction)_pakfire_set_log_level,