diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-30 18:14:46 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-01 12:47:10 +0100 |
commit | 2e388048b61f6029bae1913cbb546ac40b9cfe51 (patch) | |
tree | 8fa0fc951caab1430636fca971c27a7e7beb45ce /scripts/send-error-report | |
parent | 79be110c1fdfd0affe6a310b96e7107c4549d23c (diff) | |
download | poky-2e388048b61f6029bae1913cbb546ac40b9cfe51.tar.gz |
scripts: python3: Use print function
Used print function instead of print statement to make
the code work in python 3.
(From OE-Core rev: 80fecc44761fa38ccf2e4dc6897b9f1f0c9c1ed0)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/send-error-report')
-rwxr-xr-x | scripts/send-error-report | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/send-error-report b/scripts/send-error-report index a29feff325..ed78bd6ebb 100755 --- a/scripts/send-error-report +++ b/scripts/send-error-report | |||
@@ -108,7 +108,7 @@ def prepare_data(args): | |||
108 | if max_log_size != 0: | 108 | if max_log_size != 0: |
109 | for fail in jsondata['failures']: | 109 | for fail in jsondata['failures']: |
110 | if len(fail['log']) > max_log_size: | 110 | if len(fail['log']) > max_log_size: |
111 | print "Truncating log to allow for upload" | 111 | print("Truncating log to allow for upload") |
112 | fail['log'] = fail['log'][-max_log_size:] | 112 | fail['log'] = fail['log'][-max_log_size:] |
113 | 113 | ||
114 | data = json.dumps(jsondata, indent=4, sort_keys=True) | 114 | data = json.dumps(jsondata, indent=4, sort_keys=True) |
@@ -143,7 +143,7 @@ def send_data(data, args): | |||
143 | logging.error(e.reason) | 143 | logging.error(e.reason) |
144 | sys.exit(1) | 144 | sys.exit(1) |
145 | 145 | ||
146 | print response.read() | 146 | print(response.read()) |
147 | 147 | ||
148 | 148 | ||
149 | if __name__ == '__main__': | 149 | if __name__ == '__main__': |
@@ -192,7 +192,7 @@ if __name__ == '__main__': | |||
192 | args = arg_parse.parse_args() | 192 | args = arg_parse.parse_args() |
193 | 193 | ||
194 | if (args.json == False): | 194 | if (args.json == False): |
195 | print "Preparing to send errors to: "+args.server | 195 | print("Preparing to send errors to: "+args.server) |
196 | 196 | ||
197 | data = prepare_data(args) | 197 | data = prepare_data(args) |
198 | send_data(data, args) | 198 | send_data(data, args) |