]> git.ipfire.org Git - pakfire.git/commitdiff
python: Re-add CommandExecutionError
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 Mar 2025 11:15:53 +0000 (11:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 Mar 2025 11:15:53 +0000 (11:15 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/errors.h
src/python/pakfiremodule.c

index a84d3bfe5a4a521290dfca970e5490caf3ad337c..4751bc6e8caa1f921f1a18b799a2bf983da675cd 100644 (file)
@@ -24,6 +24,7 @@
 #include <Python.h>
 
 // Exceptions
+extern PyObject* PyExc_CommandExecutionError;
 extern PyObject* PyExc_DependencyError;
 
 #endif /* PYTHON_PAKFIRE_ERRORS_H */
index af7b9acb10f91c6fcc9639f95dc5af7922f08d19..ebd0eb05527ef69da7bc614ffc882a72a42b5a5a 100644 (file)
@@ -111,6 +111,12 @@ PyMODINIT_FUNC PyInit_pakfire(void) {
        if (r < 0)
                goto ERROR;
 
+       // CommandExecutionError
+       PyExc_CommandExecutionError = PyErr_NewException("pakfire.CommandExecutionError", NULL, NULL);
+       Py_INCREF(PyExc_CommandExecutionError);
+       PyModule_AddObject(module, "CommandExecutionError", PyExc_CommandExecutionError);
+
+       // DependencyError
        PyExc_DependencyError = PyErr_NewException("pakfire.DependencyError", NULL, NULL);
        Py_INCREF(PyExc_DependencyError);
        PyModule_AddObject(module, "DependencyError", PyExc_DependencyError);