grit: assume strings with util.TempDir inputs by default
All callers of this API pass in string inputs as their data. Change the file mode to match as Python 3 enforces this. We make it an argument so callers can change this (which we will need in the future to write binary data). Because the Chrome CQ can't handle atomic sets, we squash in: grit: chrome_scaled_image: use bytes for all png data This code has been mixing bytes & strings when constructing the png test images which Python 3 doesn't allow. Clean it up to use bytes for everything and write out the tempfiles in binary mode. Bug: 983071 Test: `./grit/test_suite_all.py` passes Change-Id: I1c71bf3305b9a49faff79a49ec68e64bbbd6135a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1757315 Commit-Queue: Mike Frysinger <vapier@chromium.org> Reviewed-by:Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#738995}
Showing
Please register or sign in to comment