summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-07-11 11:35:48 +1200
committerLars Wirzenius <liw@liw.fi>2010-07-11 11:35:48 +1200
commit104cb97c5a4204d5e8aaf75d8bd79d05d898d1fb (patch)
treeeb70be5885a4272fffad2f5bdebbbdd887e98130
parent02d6447ac78ec3bc0ea9da8f87ca263592c667a9 (diff)
downloadobnam-104cb97c5a4204d5e8aaf75d8bd79d05d898d1fb.tar.gz
Raise OSError if lutimes returned error.
-rw-r--r--obnamlib/vfs_local.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/obnamlib/vfs_local.py b/obnamlib/vfs_local.py
index e580bb3d..e4ce3d92 100644
--- a/obnamlib/vfs_local.py
+++ b/obnamlib/vfs_local.py
@@ -79,7 +79,9 @@ class LocalFS(obnamlib.VirtualFileSystem):
os.chmod(self.join(pathname), mode)
def lutimes(self, pathname, atime, mtime):
- obnamlib._obnam.lutimes(self.join(pathname), atime, mtime)
+ ret = obnamlib._obnam.lutimes(self.join(pathname), atime, mtime)
+ if ret != 0:
+ raise OSError(ret, errno.errorcode[ret], pathname)
def link(self, existing, new):
os.link(self.join(existing), self.join(new))