def UpdateDispatch(self):
    if self.args:
      self.parser.error('Expected a single <directory> argument.')

    rpcserver = self._GetRpcServer()


    dispatch_yaml = self._ParseDispatchYaml(self.basepath)
    if dispatch_yaml:
      if self.options.app_id:
        dispatch_yaml.application = self.options.app_id
      if not dispatch_yaml.application:
        self.parser.error('Expected -A app_id when dispatch.yaml.application'
                          ' is not set.')
      StatusUpdate('Uploading dispatch entries.')
      rpcserver.Send('/api/dispatch/update',
                     app_id=dispatch_yaml.application,
                     payload=dispatch_yaml.ToYAML())
    else:
      print >>sys.stderr, ('Could not find dispatch configuration. No action'
                           ' taken.')
Updates new or changed dispatch definitions.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appcfg.py/AppCfgApp.UpdateDispatch