web: don't break status page when there is no helper running

This commit is contained in:
Brian Warner
2008-04-14 23:42:20 -07:00
parent a0fa21e442
commit 6de2a0794f
2 changed files with 15 additions and 4 deletions

View File

@ -371,9 +371,15 @@ class Client(node.Node, testutil.PollMixin):
return watcher.list_recent_retrieve()
def list_active_helper_statuses(self):
helper = self.getServiceNamed("helper")
try:
helper = self.getServiceNamed("helper")
except KeyError:
return []
return helper.get_active_upload_statuses()
def list_recent_helper_statuses(self):
helper = self.getServiceNamed("helper")
try:
helper = self.getServiceNamed("helper")
except KeyError:
return []
return helper.get_recent_upload_statuses()