Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)