diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-12-23 19:53:11 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-12-23 19:53:11 +0000 |
commit | 3b760105acd493d15ad7aa0a82d5bb6272517ac7 (patch) | |
tree | d1568cb43fbd9998f9d1ef26a331b1045f9bef5a /obnamlib/plugins/restore_plugin.py | |
parent | 4ffb4565e6b003a08f3e45ecb1656443a63ad490 (diff) | |
download | obnam-3b760105acd493d15ad7aa0a82d5bb6272517ac7.tar.gz |
Fix crash when failing to restore extended attributes
Reported-By: S. B.
Diffstat (limited to 'obnamlib/plugins/restore_plugin.py')
-rw-r--r-- | obnamlib/plugins/restore_plugin.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/obnamlib/plugins/restore_plugin.py b/obnamlib/plugins/restore_plugin.py index 2e08dc91..e95b4e0c 100644 --- a/obnamlib/plugins/restore_plugin.py +++ b/obnamlib/plugins/restore_plugin.py @@ -157,7 +157,14 @@ class RestorePlugin(obnamlib.ObnamPlugin): else: self.restore_first_link(gen, pathname, metadata) if set_metadata and self.write_ok: - obnamlib.set_metadata(self.fs, './' + pathname, metadata) + try: + obnamlib.set_metadata(self.fs, './' + pathname, metadata) + except (IOError, OSError), e: + msg = ('Could not set metadata: %s: %d: %s' % + (pathname, e.errno, e.strerror)) + logging.error(msg) + self.app.ts.notify(msg) + self.errors = True def restore_dir(self, gen, root, metadata): logging.debug('restoring dir %s' % root) |