]> git.ipfire.org Git - pakfire.git/commitdiff
python: Send the progress title in the start callback
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Mar 2025 12:01:25 +0000 (12:01 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Mar 2025 12:01:25 +0000 (12:01 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/ctx.c

index a1b3b53fc2c70f1c87154434ed620705985198d3..ab9a6debbee58abb6fad84f2330bc995e4d67187 100644 (file)
@@ -283,6 +283,9 @@ static int Ctx_progress_start(struct pakfire_ctx* ctx,
        PyObject* p = data;
        int r = -1;
 
+       // Fetch the title
+       const char* title = pakfire_progress_get_title(progress);
+
        // Acquire the GIL
        PyGILState_STATE state = PyGILState_Ensure();
 
@@ -292,7 +295,7 @@ static int Ctx_progress_start(struct pakfire_ctx* ctx,
                goto ERROR;
 
        // Call it with the value
-       ret = PyObject_CallFunction(start, "k", value);
+       ret = PyObject_CallFunction(start, "sk", title, value);
        if (!ret)
                goto ERROR;