From: Brian Warner Date: Mon, 28 Jan 2008 21:03:29 +0000 (-0700) Subject: webish: oops, unit tests don't have an Uploader, don't rely upon it for helper-status... X-Git-Tag: allmydata-tahoe-0.8.0~218 X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/contact.html?a=commitdiff_plain;h=3b41c939f868f448914e625f560384379fb9ea5a;p=tahoe-lafs%2Ftahoe-lafs.git webish: oops, unit tests don't have an Uploader, don't rely upon it for helper-status display --- diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index 6c404466..755ae548 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -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"