diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-04-09 08:06:47 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-04-09 08:06:47 +0100 |
commit | e1904d2f4a9c9e7d7f54f2c7f1b753c6b524e099 (patch) | |
tree | f3420b6c74f5029d64925f4325a07d122decea87 /obnamlib/plugins/restore_plugin.py | |
parent | 1f7375d9bd605151dc3dbb5cebf6c47897d43cf9 (diff) | |
download | obnam-e1904d2f4a9c9e7d7f54f2c7f1b753c6b524e099.tar.gz |
Catch SetMetadataError and show better error message
Diffstat (limited to 'obnamlib/plugins/restore_plugin.py')
-rw-r--r-- | obnamlib/plugins/restore_plugin.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/obnamlib/plugins/restore_plugin.py b/obnamlib/plugins/restore_plugin.py index 2456930c..28497d38 100644 --- a/obnamlib/plugins/restore_plugin.py +++ b/obnamlib/plugins/restore_plugin.py @@ -233,11 +233,8 @@ class RestorePlugin(obnamlib.ObnamPlugin): obnamlib.set_metadata( self.fs, './' + pathname, metadata, always_set_id_bits=always) - except (IOError, OSError), e: - msg = ('Could not set metadata: %s: %d: %s' % - (pathname, e.errno, e.strerror)) - logging.error(msg) - self.app.ts.error(msg) + except obnamlib.SetMetadataError as e: + self.app.ts.error(str(e)) self.errors = True except Exception, e: # Reaching this code path means we've hit a bug, so we log |