diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-04 14:59:16 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-04 15:06:27 +0100 |
commit | b6adf09c4d2cc3f1d0285950c151b1fd7688ec67 (patch) | |
tree | 7ff59df24162a39824e65bf5e4fd0b4dafcad13a /python | |
parent | 2ef06eacc2be08b0268c98a4d157176aff9356e0 (diff) | |
download | libguestfs-b6adf09c4d2cc3f1d0285950c151b1fd7688ec67.tar.gz libguestfs-b6adf09c4d2cc3f1d0285950c151b1fd7688ec67.tar.xz libguestfs-b6adf09c4d2cc3f1d0285950c151b1fd7688ec67.zip |
Generated code for the 'sleep' command.
Diffstat (limited to 'python')
-rw-r--r-- | python/guestfs-py.c | 26 | ||||
-rw-r--r-- | python/guestfs.py | 5 |
2 files changed, 31 insertions, 0 deletions
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 } }; diff --git a/python/guestfs.py b/python/guestfs.py index a75148e5..dd9fa58c 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -1599,3 +1599,8 @@ class GuestFS: """ return libguestfsmod.e2fsck_f (self._o, device) + def sleep (self, secs): + u"""Sleep for "secs" seconds. + """ + return libguestfsmod.sleep (self._o, secs) + |