]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
mutable/publish: stop using RuntimeError, for #639
authorBrian Warner <warner@lothar.com>
Mon, 23 Feb 2009 00:30:56 +0000 (17:30 -0700)
committerBrian Warner <warner@lothar.com>
Mon, 23 Feb 2009 00:30:56 +0000 (17:30 -0700)
src/allmydata/mutable/publish.py

index ed0ef0ebcd7e6c22f2e9ac998963f59ab3ee5282..819f8bd76ff76b023ebb60d87e7fa2e91ea7c6dc 100644 (file)
@@ -79,6 +79,9 @@ class PublishStatus:
     def set_active(self, value):
         self.active = value
 
+class LoopLimitExceededError(Exception):
+    pass
+
 class Publish:
     """I represent a single act of publishing the mutable file to the grid. I
     will only publish my data if the servermap I am using still represents
@@ -290,7 +293,7 @@ class Publish:
 
         self.looplimit -= 1
         if self.looplimit <= 0:
-            raise RuntimeError("loop limit exceeded")
+            raise LoopLimitExceededError("loop limit exceeded")
 
         if self.surprised:
             # don't send out any new shares, just wait for the outstanding