mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-25 05:19:53 +00:00
mutable/publish: stop using RuntimeError, for #639
This commit is contained in:
parent
c4f8005867
commit
c23d051d3f
@ -79,6 +79,9 @@ class PublishStatus:
|
|||||||
def set_active(self, value):
|
def set_active(self, value):
|
||||||
self.active = value
|
self.active = value
|
||||||
|
|
||||||
|
class LoopLimitExceededError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
class Publish:
|
class Publish:
|
||||||
"""I represent a single act of publishing the mutable file to the grid. I
|
"""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
|
will only publish my data if the servermap I am using still represents
|
||||||
@ -290,7 +293,7 @@ class Publish:
|
|||||||
|
|
||||||
self.looplimit -= 1
|
self.looplimit -= 1
|
||||||
if self.looplimit <= 0:
|
if self.looplimit <= 0:
|
||||||
raise RuntimeError("loop limit exceeded")
|
raise LoopLimitExceededError("loop limit exceeded")
|
||||||
|
|
||||||
if self.surprised:
|
if self.surprised:
|
||||||
# don't send out any new shares, just wait for the outstanding
|
# don't send out any new shares, just wait for the outstanding
|
||||||
|
Loading…
x
Reference in New Issue
Block a user