]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Raise a more explanatory exception for errors encountered during backup processing.
authorAlberto Berti <alberto@metapensiero.it>
Sun, 22 Feb 2009 18:02:52 +0000 (11:02 -0700)
committerAlberto Berti <alberto@metapensiero.it>
Sun, 22 Feb 2009 18:02:52 +0000 (11:02 -0700)
src/allmydata/scripts/tahoe_backup.py

index 6b829c02a8ba00954ac41f98943294e3b9cd6e57..bbde7623fcd5be820b70f04110886fe73f994f5e 100644 (file)
@@ -113,6 +113,9 @@ def directory_is_changed(a, b):
                 return True
     return False
 
+class BackupProcessingError(Exception):
+    pass
+
 class BackerUpper:
     def __init__(self, options):
         self.options = options
@@ -248,7 +251,7 @@ class BackerUpper:
                 newfilecap, metadata = self.upload(childpath)
                 newdircontents[child] = ("filenode", newfilecap, metadata)
             else:
-                raise RuntimeError("how do I back this up?")
+                raise BackupProcessingError("Cannot backup this file %r" % childpath)
 
         if (olddircap
             and olddircontents is not None