]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
download: DownloadStopped isn't SCARY, lower the log severity
authorBrian Warner <warner@allmydata.com>
Tue, 15 Apr 2008 23:06:09 +0000 (16:06 -0700)
committerBrian Warner <warner@allmydata.com>
Tue, 15 Apr 2008 23:06:09 +0000 (16:06 -0700)
src/allmydata/download.py

index 853e946ae19cb4fc200ea9ae0d355a5ea76677a7..2d239522b797ea139a33e81888cd931def4527a2 100644 (file)
@@ -110,7 +110,12 @@ class Output:
 
     def fail(self, why):
         # this is really unusual, and deserves maximum forensics
-        self.log("download failed!", failure=why, level=log.SCARY)
+        if why.check(DownloadStopped):
+            # except DownloadStopped just means the consumer aborted the
+            # download, not so scary
+            self.log("download stopped", level=log.UNUSUAL)
+        else:
+            self.log("download failed!", failure=why, level=log.SCARY)
         self.downloadable.fail(why)
 
     def close(self):