def _UploadMissingFiles(self, missing_files, openfunc):
    """DoUpload helper to upload files that need to be uploaded.

    Args:
      missing_files: List of files that need to be uploaded. Begin returns such
        a list. Design note: we don't call Begin here, because we want DoUpload
        to call it directly so that Begin/Commit are more clearly paired.
      openfunc: Function that takes a path relative to the app's base path, and
        returns a file-like object.
    """
    if not missing_files:
      return

    StatusUpdate('Uploading %d files and blobs.' % len(missing_files),
                 self.error_fh)
    num_files = 0
    for missing_file in missing_files:
      file_handle = openfunc(missing_file)
      try:
        self.UploadFile(missing_file, file_handle)
      finally:
        file_handle.close()


      num_files += 1
      if 500 % num_files == 0:
        StatusUpdate('Processed %d out of %s.' %
                     (num_files, len(missing_files)), self.error_fh)


    self.file_batcher.Flush()
    self.blob_batcher.Flush()
    self.errorblob_batcher.Flush()
    StatusUpdate('Uploaded %d files and blobs.' % num_files, self.error_fh)
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/appcfg.py/AppVersionUpload._UploadMissingFiles/swapped operands of `%`