Commit 8a2e6a7a authored by Takuto Ikuta's avatar Takuto Ikuta Committed by LUCI CQ

ninjalog_uploader_wrapper: do not use binary read/write for json

This is for python3 compatibility.

Bug: b/177465438
Change-Id: I4770136ea702bcaf7a8b644ef842db2f1a7d1200
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2717272Reviewed-by: 's avatarDirk Pranke <dpranke@google.com>
Reviewed-by: 's avatarChris Hall <chrishall@chromium.org>
Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
parent b06d1e52
......@@ -22,7 +22,7 @@ VERSION = 2
def LoadConfig():
if os.path.isfile(CONFIG):
with open(CONFIG, 'rb') as f:
with open(CONFIG, 'r') as f:
config = json.load(f)
if config['version'] == VERSION:
config['countdown'] = max(0, config['countdown'] - 1)
......@@ -37,7 +37,7 @@ def LoadConfig():
def SaveConfig(config):
with open(CONFIG, 'wb') as f:
with open(CONFIG, 'w') as f:
json.dump(config, f)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment