Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e44a530 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix python3 errors: "TypeError: write() argument must be str, not bytes"" am: 955ee371

Original change: https://android-review.googlesource.com/c/platform/build/+/1977398

Change-Id: I07d7bcfa7191408bdc23c4c893aae0c7e932d7cf
parents 0b828a50 955ee371
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -170,16 +170,16 @@ def AddVendor(output_zip, recovery_img=None, boot_img=None):
    return img.name

  def output_sink(fn, data):
    ofile = open(os.path.join(OPTIONS.input_tmp, "VENDOR", fn), "w")
    output_file = os.path.join(OPTIONS.input_tmp, "VENDOR", fn)
    with open(output_file, "wb") as ofile:
      ofile.write(data)
    ofile.close()

    if output_zip:
      arc_name = "VENDOR/" + fn
      if arc_name in output_zip.namelist():
        OPTIONS.replace_updated_files_list.append(arc_name)
      else:
        common.ZipWrite(output_zip, ofile.name, arc_name)
        common.ZipWrite(output_zip, output_file, arc_name)

  board_uses_vendorimage = OPTIONS.info_dict.get(
      "board_uses_vendorimage") == "true"