from foolscap.api import eventually
from allmydata.util import log
from allmydata.util.spans import overlap
+from allmydata.interfaces import DownloadStopped
-from common import BadSegmentNumberError, WrongSegmentError, DownloadStopped
+from common import BadSegmentNumberError, WrongSegmentError
class Segmentation:
"""I am responsible for a single offset+size read of the file. I handle
class NoSharesError(Exception):
"""Download was unable to get any shares at all."""
+class DownloadStopped(Exception):
+ pass
+
class UploadUnhappinessError(Exception):
"""Upload was unable to satisfy 'servers_of_happiness'"""
from allmydata.immutable import upload, layout
from allmydata.test.no_network import GridTestMixin, NoNetworkServer
from allmydata.test.common import ShouldFailMixin
-from allmydata.interfaces import NotEnoughSharesError, NoSharesError
+from allmydata.interfaces import NotEnoughSharesError, NoSharesError, \
+ DownloadStopped
from allmydata.immutable.downloader.common import BadSegmentNumberError, \
- BadCiphertextHashError, DownloadStopped, COMPLETE, OVERDUE, DEAD
+ BadCiphertextHashError, COMPLETE, OVERDUE, DEAD
from allmydata.immutable.downloader.status import DownloadStatus
from allmydata.immutable.downloader.fetcher import SegmentFetcher
from allmydata.codec import CRSDecoder