• Yura Yaroshevich's avatar
    Specify open file encoding explicitly. · 48614441
    Yura Yaroshevich authored
    This fixes an error on some Windows installations:
    ```
    fetch webrtc
    Traceback (most recent call last):
      File "googlesource.com\depot_tools\bootstrap\bootstrap.py", line 365, in <module>
        sys.exit(main(sys.argv[1:]))
      File "googlesource.com\depot_tools\bootstrap\bootstrap.py", line 324, in main
        git_postprocess(template, os.path.join(bootstrap_dir, 'git'))
      File "googlesource.com\depot_tools\bootstrap\bootstrap.py", line 264, in git_postprocess
        maybe_copy(
      File "googlesource.com\depot_tools\bootstrap\bootstrap.py", line 108, in maybe_copy
        content = fd.read()
      File "googlesource.com\depot_tools\bootstrap-3_8_0b1_chromium_1_bin\python3\bin\lib\encodings\cp1251.py", line 23, in decode
        return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 18734: character maps to <undefined>
    ```
    Bug: None
    Change-Id: I43cf7b51879ac9a66c33566536dcdcb4c93e0fc0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1881227Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
    Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
    48614441
bootstrap.py 12.1 KB