def getChild(self, path, request): if path == "helper_status": # the Helper isn't attached until after the Tub starts, so this child # needs to created on each request return status.HelperStatus(self.client.helper) if path == "storage": # Storage isn't initialized until after the web hierarchy is # constructed so this child needs to be created later than # `__init__`. try: storage_server = self.client.getServiceNamed("storage") except KeyError: storage_server = None return storage.StorageStatus(storage_server, self.client.nickname)
def child_helper_status(self, ctx): # the Helper isn't attached until after the Tub starts, so this child # needs to created on each request return status.HelperStatus(self.client.helper)
def getChild(self, path, request): if path == "helper_status": # the Helper isn't attached until after the Tub starts, so this child # needs to created on each request return status.HelperStatus(self.client.helper)