diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-07-11 11:35:48 +1200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-07-11 11:35:48 +1200 |
commit | 104cb97c5a4204d5e8aaf75d8bd79d05d898d1fb (patch) | |
tree | eb70be5885a4272fffad2f5bdebbbdd887e98130 | |
parent | 02d6447ac78ec3bc0ea9da8f87ca263592c667a9 (diff) | |
download | obnam-104cb97c5a4204d5e8aaf75d8bd79d05d898d1fb.tar.gz |
Raise OSError if lutimes returned error.
-rw-r--r-- | obnamlib/vfs_local.py | 4 |
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)) |