Py3: fix the OSC download job binary command

Story: 2005807
Task: 33546

Change-Id: I01660375c17938f1eb2920cf0d599083d3d300e1
This commit is contained in:
Luigi Toscano 2019-05-29 01:00:37 +02:00
parent c53831d686
commit ac714f3c47
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Fix the "job binary download" command when Python 3 is used.

View File

@ -506,7 +506,7 @@ class DownloadJobBinary(command.Command):
client.job_binaries, parsed_args.job_binary)
data = client.job_binaries.get_file(jb_id)
with open(parsed_args.file, 'w') as f:
with open(parsed_args.file, 'wb') as f:
f.write(data)
sys.stdout.write(
'Job binary "{jb}" has been downloaded '