]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
webish: oops, unit tests don't have an Uploader, don't rely upon it for helper-status...
authorBrian Warner <warner@allmydata.com>
Mon, 28 Jan 2008 21:03:29 +0000 (14:03 -0700)
committerBrian Warner <warner@allmydata.com>
Mon, 28 Jan 2008 21:03:29 +0000 (14:03 -0700)
src/allmydata/webish.py

index 6c40446625aeed9d94705e220875fe9c19ea024f..755ae548fde9691decfd61c5d2a9526669362184 100644 (file)
@@ -1321,11 +1321,17 @@ class Root(rend.Page):
         return "no"
 
     def data_helper_furl(self, ctx, data):
-        uploader = IClient(ctx).getServiceNamed("uploader")
+        try:
+            uploader = IClient(ctx).getServiceNamed("uploader")
+        except KeyError:
+            return None
         furl, connected = uploader.get_helper_info()
         return furl
     def data_connected_to_helper(self, ctx, data):
-        uploader = IClient(ctx).getServiceNamed("uploader")
+        try:
+            uploader = IClient(ctx).getServiceNamed("uploader")
+        except KeyError:
+            return "no" # we don't even have an Uploader
         furl, connected = uploader.get_helper_info()
         if connected:
             return "yes"