]> arthur.barton.de Git - bup.git/commitdiff
open_noatime bup_get_linux_file_attr: accommodate python 3
authorRob Browning <rlb@defaultvalue.org>
Sun, 29 Dec 2019 22:22:40 +0000 (16:22 -0600)
committerRob Browning <rlb@defaultvalue.org>
Mon, 20 Jan 2020 21:17:44 +0000 (15:17 -0600)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c

index 62f421ae8e05996aff1a9f458aa500ad3e217dc0..aadcbe4e149cd4a8584365def0d0d5dbb753839f 100644 (file)
@@ -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);