def _Dynamic_IsEnabled(self, request, response):
    """Implementation of CapabilityService::IsEnabled().

    Args:
      request: An IsEnabledRequest.
      response: An IsEnabledResponse.
    """
    default_config = response.add_config()
    default_config.set_package('')
    default_config.set_capability('')

    try:
      package_enabled = self._packages[request.package()]
    except __HOLE__:
      summary_status = IsEnabledResponse.UNKNOWN
      config_status = CapabilityConfig.UNKNOWN
    else:
      if package_enabled:
        summary_status = IsEnabledResponse.ENABLED
        config_status = CapabilityConfig.ENABLED
      else:
        summary_status = IsEnabledResponse.DISABLED
        config_status = CapabilityConfig.DISABLED
    response.set_summary_status(summary_status)
    default_config.set_status(config_status)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/capabilities/capability_stub.py/CapabilityServiceStub._Dynamic_IsEnabled