]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
python: execute: Drop enable_network switch
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Aug 2022 21:01:10 +0000 (21:01 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Aug 2022 21:01:10 +0000 (21:01 +0000)
This is never being used in the code.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/_pakfire/pakfire.c

index 58101b7acd8d686e5b8dac03e2c041f462bef0e7..f4975ce245b28ea03b06d5d75d1b363d3b9be539 100644 (file)
@@ -819,7 +819,6 @@ static PyObject* Pakfire_execute(PakfireObject* self, PyObject* args, PyObject*
        char* kwlist[] = {
                "command",
                "environ",
-               "enable_network",
                "interactive",
                "logging_callback",
                "nice",
@@ -836,14 +835,13 @@ static PyObject* Pakfire_execute(PakfireObject* self, PyObject* args, PyObject*
 
        PyObject* command = NULL;
        PyObject* environ = NULL;
-       int enable_network = 0;
        int interactive = 0;
        PyObject* logging_callback = NULL;
        int nice = 0;
        int return_output = 0;
 
-       if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OppOip", kwlist, &command, &environ,
-                       &enable_network, &interactive, &logging_callback, &nice, &return_output))
+       if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OpOip", kwlist, &command, &environ,
+                       &interactive, &logging_callback, &nice, &return_output))
                return NULL;
 
        // Check if command is a list
@@ -878,12 +876,6 @@ static PyObject* Pakfire_execute(PakfireObject* self, PyObject* args, PyObject*
                argv[i] = PyUnicode_AsUTF8(item);
        }
 
-#if 0
-       // Enable network?
-       if (enable_network)
-               flags |= PAKFIRE_JAIL_ENABLE_NETWORK;
-#endif
-
        // Interactive?
        if (interactive)
                flags |= PAKFIRE_JAIL_INTERACTIVE;