Files app: Fix create_test_main.py to run as python3
Python3 does automatic utf-8 decode/encode when reading/writing files and it throws an exception when reading binary files in normal 'r' mode. When we detect such an error, we will read and write the file as binary 'rb' / 'wb' without doing any text substitutions. The script is tested locally and works for python2 and python3 Bug: 1163386 Change-Id: I46f53dcafbdb43a367e5418bab84cf7a0ebd84a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617408 Commit-Queue: Joel Hockey <joelhockey@chromium.org> Auto-Submit: Joel Hockey <joelhockey@chromium.org> Reviewed-by:Luciano Pacheco <lucmult@chromium.org> Cr-Commit-Position: refs/heads/master@{#841385}
Showing
Please register or sign in to comment