]> arthur.barton.de Git - bup.git/commitdiff
Return None from bup_set_linux_file_attr() and bup_utimensat().
authorRob Browning <rlb@defaultvalue.org>
Sun, 27 Mar 2011 17:01:46 +0000 (12:01 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 8 May 2011 07:39:14 +0000 (03:39 -0400)
Return None from bup_set_linux_file_attr() and bup_utimensat() since
errors are handled by exceptions.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c
lib/bup/xstat.py

index 5343b8d839aeb66ecb20b0bfd6197a462b986adb..2e7c6bff382efdb6d4e67969cabb9fa1b1c3e785 100644 (file)
@@ -679,7 +679,7 @@ static PyObject *bup_set_linux_file_attr(PyObject *self, PyObject *args)
     }
 
     close(fd);
-    return Py_BuildValue("i", 1);
+    return Py_BuildValue("O", Py_None);
 }
 #endif /* def linux */
 
@@ -754,7 +754,7 @@ static PyObject *bup_utimensat(PyObject *self, PyObject *args)
     if (rc != 0)
         return PyErr_SetFromErrnoWithFilename(PyExc_OSError, path);
 
-    return Py_BuildValue("i", 1);
+    return Py_BuildValue("O", Py_None);
 }
 
 #endif /* defined(_ATFILE_SOURCE)
index bad1c274be77506f9d2807b0eb837adbc3e9cbe5..c2533705ded008641213c4f407f659b164db8fb0 100644 (file)
@@ -36,12 +36,12 @@ if _have_utimensat:
     def lutime(path, times):
         atime = nsecs_to_timespec(times[0])
         mtime = nsecs_to_timespec(times[1])
-        return _helpers.utimensat(_helpers.AT_FDCWD, path, (atime, mtime),
-                                  _helpers.AT_SYMLINK_NOFOLLOW)
+        _helpers.utimensat(_helpers.AT_FDCWD, path, (atime, mtime),
+                           _helpers.AT_SYMLINK_NOFOLLOW)
     def utime(path, times):
         atime = nsecs_to_timespec(times[0])
         mtime = nsecs_to_timespec(times[1])
-        return _helpers.utimensat(_helpers.AT_FDCWD, path, (atime, mtime), 0)
+        _helpers.utimensat(_helpers.AT_FDCWD, path, (atime, mtime), 0)
 else:
     def lutime(path, times):
         return None