From b6adf09c4d2cc3f1d0285950c151b1fd7688ec67 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 4 Jun 2009 14:59:16 +0100 Subject: Generated code for the 'sleep' command. --- python/guestfs-py.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'python/guestfs-py.c') diff --git a/python/guestfs-py.c b/python/guestfs-py.c index 71ef85e7..dcfa5fb8 100644 --- a/python/guestfs-py.c +++ b/python/guestfs-py.c @@ -4406,6 +4406,31 @@ py_guestfs_e2fsck_f (PyObject *self, PyObject *args) return py_r; } +static PyObject * +py_guestfs_sleep (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + int r; + int secs; + + if (!PyArg_ParseTuple (args, (char *) "Oi:guestfs_sleep", + &py_g, &secs)) + return NULL; + g = get_handle (py_g); + + r = guestfs_sleep (g, secs); + if (r == -1) { + PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); + return NULL; + } + + Py_INCREF (Py_None); + py_r = Py_None; + return py_r; +} + static PyMethodDef methods[] = { { (char *) "create", py_guestfs_create, METH_VARARGS, NULL }, { (char *) "close", py_guestfs_close, METH_VARARGS, NULL }, @@ -4569,6 +4594,7 @@ static PyMethodDef methods[] = { { (char *) "resize2fs", py_guestfs_resize2fs, METH_VARARGS, NULL }, { (char *) "find", py_guestfs_find, METH_VARARGS, NULL }, { (char *) "e2fsck_f", py_guestfs_e2fsck_f, METH_VARARGS, NULL }, + { (char *) "sleep", py_guestfs_sleep, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; -- cgit