def Update(self):
    """Updates and deploys a new appversion and global app configs."""
    if not os.path.isdir(self.basepath):

      self.UpdateUsingSpecificFiles()
      return

    if JavaSupported() and appcfg_java.IsWarFileWithoutYaml(self.basepath):
      java_app_update = appcfg_java.JavaAppUpdate(self.basepath, self.options)
      self.options.compile_jsps = not java_app_update.app_engine_web_xml.vm






      sdk_root = os.path.dirname(appcfg_java.__file__)
      self.stage_dir = java_app_update.CreateStagingDirectory(sdk_root)
      try:
        appyaml = self._ParseAppInfoFromYaml(
            self.stage_dir,
            basename=os.path.splitext(APP_YAML_FILENAME)[0])
        self._UpdateWithParsedAppYaml(appyaml, self.stage_dir)
      finally:
        if self.options.retain_upload_dir:
          StatusUpdate(
              self.stage_dir % 'Temporary staging directory left in %s',
              self.error_fh)
        else:
          shutil.rmtree(self.stage_dir)
    else:
      appyaml = self._ParseAppInfoFromYaml(
          self.basepath,
          basename=os.path.splitext(APP_YAML_FILENAME)[0])
      self._UpdateWithParsedAppYaml(appyaml, self.basepath)
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/appcfg.py/AppCfgApp.Update/swapped operands of `%`