def upload_package(args, artifact, version):
  package_path = get_local_package_path(artifact, version)
  Log.print_info("Uploading pacakge: %s" % package_path)

  revision = generate_package_revision(get_root_dir(args.service))
  Log.print_success("Revision is: %s" % revision)

  Log.print_info("Generating checksum of package: %s" % package_path)
  checksum = generate_checksum(package_path)
  Log.print_success("Checksum is: %s" % checksum)

  tank_client = get_tank_client()
  package_info = tank_client.check_package(artifact, checksum)

  if not package_info:
    if 200 == tank_client.upload(package_path, artifact, revision):
      Log.print_success("Upload package %s success" % package_path)
      package_info = tank_client.check_package(artifact, checksum)
      return eval(package_info)
  else:
    Log.print_warning("Package %s has already uploaded, skip uploading" %
        package_path)
    return eval(package_info)
  return None
If C{quiescentCallback} throws an exception, the error is logged and
dataset/ETHPy150Open XiaoMi/minos/client/deploy_utils.py/upload_package--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/web/test/test_newclient.py/HTTP11ClientProtocolTests.test_quiescentCallbackThrows