From 3b41c939f868f448914e625f560384379fb9ea5a Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 28 Jan 2008 14:03:29 -0700 Subject: [PATCH] webish: oops, unit tests don't have an Uploader, don't rely upon it for helper-status display --- src/allmydata/webish.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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" -- 2.45.2