From c54fdd61b030f50b827f29a287cdb28afa15c463 Mon Sep 17 00:00:00 2001 From: Alberto Berti Date: Sun, 22 Feb 2009 11:02:52 -0700 Subject: [PATCH] Raise a more explanatory exception for errors encountered during backup processing. --- src/allmydata/scripts/tahoe_backup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/allmydata/scripts/tahoe_backup.py b/src/allmydata/scripts/tahoe_backup.py index 6b829c02..bbde7623 100644 --- a/src/allmydata/scripts/tahoe_backup.py +++ b/src/allmydata/scripts/tahoe_backup.py @@ -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 -- 2.45.2