summaryrefslogtreecommitdiff
path: root/obnamlib/plugins/restore_plugin.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-02-15 21:43:19 +0000
committerLars Wirzenius <liw@liw.fi>2014-02-15 21:43:19 +0000
commita00709903eec58f23214fbbe2edd0723fbfd8ba3 (patch)
tree3fca8ed17d0df3ff60333832b968a953185502ed /obnamlib/plugins/restore_plugin.py
parentad3270bd34fd062d99ac64a6a02d7f21a9cf946f (diff)
downloadobnam-a00709903eec58f23214fbbe2edd0723fbfd8ba3.tar.gz
Convert another exception to StructuredError in restore
Diffstat (limited to 'obnamlib/plugins/restore_plugin.py')
-rw-r--r--obnamlib/plugins/restore_plugin.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/obnamlib/plugins/restore_plugin.py b/obnamlib/plugins/restore_plugin.py
index caa5f2b7..d831a2bf 100644
--- a/obnamlib/plugins/restore_plugin.py
+++ b/obnamlib/plugins/restore_plugin.py
@@ -29,6 +29,11 @@ class WrongNumberOfGenerationSettingsError(obnamlib.ObnamError):
msg = 'The restore command wants exactly one generation option'
+class RestoreErrors(obnamlib.ObnamError):
+
+ msg = 'There were errors when restoring'
+
+
class Hardlinks(object):
'''Keep track of inodes with unrestored hardlinks.'''
@@ -163,7 +168,7 @@ class RestorePlugin(obnamlib.ObnamPlugin):
self.app.ts.finish()
if self.errors:
- raise obnamlib.Error('There were errors when restoring')
+ raise RestoreErrors()
def restore_something(self, gen, root):
for pathname in self.repo.walk_generation(gen, root):