Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: client/swarming.py

Issue 1404063003: Fix regression in 49abac87faa60. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/swarming.py
diff --git a/client/swarming.py b/client/swarming.py
index 9fa8bbdfcf66d7457d8c0b4a5f1fbad6a3eab79b..60c9f9dd20a922b52f6c7b3a44f7e9ebebfb8ac3 100755
--- a/client/swarming.py
+++ b/client/swarming.py
@@ -1063,7 +1063,7 @@ def CMDcollect(parser, args):
if options.json:
try:
- with fs.open(options.json, 'rb') as f:
+ with fs.open(unicode(options.json), 'rb') as f:
tasks = sorted(
json.load(f)['tasks'].itervalues(), key=lambda x: x['shard_index'])
args = [t['task_id'] for t in tasks]
@@ -1184,7 +1184,7 @@ def CMDquery(parser, args):
data.pop('cursor', None)
if options.json:
- tools.write_json(options.json, data, True)
+ tools.write_json(unicode(options.json), data, True)
else:
try:
tools.write_json(sys.stdout, data, False)
@@ -1209,7 +1209,7 @@ def CMDquery_list(parser, args):
except APIError as e:
parser.error(str(e))
if options.json:
- with fs.open(options.json, 'wb') as f:
+ with fs.open(unicode(options.json), 'wb') as f:
json.dump(apis, f)
else:
help_url = (
@@ -1366,7 +1366,7 @@ def CMDtrigger(parser, args):
'base_task_name': options.task_name,
'tasks': tasks,
}
- tools.write_json(options.dump_json, data, True)
+ tools.write_json(unicode(options.dump_json), data, True)
print('To collect results, use:')
print(' swarming.py collect -S %s --json %s' %
(options.swarming, options.dump_json))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698