def IsEndpointsConfigUpdated(self):
    """Check if the Endpoints configuration for this app has been updated.

    This should only be called if the app has a Google Cloud Endpoints
    handler, or if it's removing one.  The server performs the check to see
    if Endpoints support is added/updated/removed, and the response to the
    isserving call indicates whether IsEndpointsConfigUpdated should be called.

    Raises:
      AssertionError: Deploy has not yet been called.
      CannotStartServingError: There was an unexpected error with the server
        response.

    Returns:
      (done, updated_state), where done is False if this function should
      be called again to retry, True if not.  updated_state is an
      EndpointsState value indicating whether the Endpoints configuration has
      been updated on the server.
    """

    assert self.started, ('StartServing() must be called before '
                          'IsEndpointsConfigUpdated().')

    StatusUpdate('Checking if Endpoints configuration has been updated.',
                 self.error_fh)

    result = self.logging_context.Send('/api/isconfigupdated')
    result = AppVersionUpload._ValidateIsEndpointsConfigUpdatedYaml(result)
    if result is None:
      raise CannotStartServingError(
          'Internal error: Could not parse IsEndpointsConfigUpdated response.')
    if 'updatedDetail2' in result:
      updated_state = EndpointsState.Parse(result['updatedDetail2'])
      user_error = result.get('errorMessage')
    else:





      updated_state = (EndpointsState.SERVING if result['updated']
                       else EndpointsState.PENDING)
      user_error = None
    return updated_state != EndpointsState.PENDING, (updated_state, user_error)
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/appcfg.py/AppVersionUpload.IsEndpointsConfigUpdated/original