From: Rob Browning Date: Sun, 29 Dec 2019 22:22:40 +0000 (-0600) Subject: open_noatime bup_get_linux_file_attr: accommodate python 3 X-Git-Tag: 0.31~186 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=d8684a29a3346bf34dbcf61f33deb5cebf2a85db open_noatime bup_get_linux_file_attr: accommodate python 3 Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index 62f421a..aadcbe4 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -1150,7 +1150,7 @@ static PyObject *open_noatime(PyObject *self, PyObject *args) { char *filename = NULL; int fd; - if (!PyArg_ParseTuple(args, "s", &filename)) + if (!PyArg_ParseTuple(args, cstr_argf, &filename)) return NULL; fd = _open_noatime(filename, 0); if (fd < 0) @@ -1197,7 +1197,7 @@ static PyObject *bup_get_linux_file_attr(PyObject *self, PyObject *args) char *path; int fd; - if (!PyArg_ParseTuple(args, "s", &path)) + if (!PyArg_ParseTuple(args, cstr_argf, &path)) return NULL; fd = _open_noatime(path, O_NONBLOCK);