]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
move DownloadStopped from download.common to interfaces
authorBrian Warner <warner@lothar.com>
Sun, 4 Sep 2011 02:59:06 +0000 (19:59 -0700)
committerBrian Warner <warner@lothar.com>
Fri, 9 Sep 2011 18:11:50 +0000 (11:11 -0700)
src/allmydata/immutable/downloader/common.py
src/allmydata/immutable/downloader/segmentation.py
src/allmydata/interfaces.py
src/allmydata/test/test_download.py

index e9dd2719f5cf5ac46a7cc98772c6212705a6558a..7e5f4ded7fb9458d9ca9e7cf4ece84823fdc3bc7 100644 (file)
@@ -8,6 +8,3 @@ class WrongSegmentError(Exception):
     pass
 class BadCiphertextHashError(Exception):
     pass
-
-class DownloadStopped(Exception):
-    pass
index 84dddbe98fb5d6a3d30f72d363e96f51dfbed955..07307c36705db0c353a445d1d775929d751b4135 100644 (file)
@@ -7,8 +7,9 @@ from twisted.internet.interfaces import IPushProducer
 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
index 3081e94e2fdf7fe65d8911798072bea6eeccc2c1..9536320dd9701044884ccf8809687fe01f45cab4 100644 (file)
@@ -1055,6 +1055,9 @@ class NotEnoughSharesError(Exception):
 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'"""
 
index e5357085224fab998f861bdf3a394264d5424857..30485b4a020da0ad8b0a23eeba5c2a9b296174fa 100644 (file)
@@ -13,9 +13,10 @@ from allmydata.util.consumer import download_to_data, MemoryConsumer
 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