From: Brian Warner Date: Mon, 23 Feb 2009 00:30:56 +0000 (-0700) Subject: mutable/publish: stop using RuntimeError, for #639 X-Git-Tag: allmydata-tahoe-1.4.0~140 X-Git-Url: https://git.rkrishnan.org/pf/content/en/footer/FOOURL?a=commitdiff_plain;h=c23d051d3f004957a57ceecbced1840ade050b91;p=tahoe-lafs%2Ftahoe-lafs.git mutable/publish: stop using RuntimeError, for #639 --- diff --git a/src/allmydata/mutable/publish.py b/src/allmydata/mutable/publish.py index ed0ef0eb..819f8bd7 100644 --- a/src/allmydata/mutable/publish.py +++ b/src/allmydata/mutable/publish.py @@ -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