Skip to content

Commit d192b79

Browse files
committed
Encode webservice output with UTF-8
1 parent 45a4897 commit d192b79

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.0.2'
1+
__version__ = '2.0.3'

vxapi.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,16 +368,15 @@ def run(self):
368368
if arg_iter['verbose'] is True:
369369
CliMsgPrinter.print_showing_response(arg_iter, current_iteration)
370370

371-
print(iter_cli_object.get_result_msg())
371+
sys.stdout.buffer.write(iter_cli_object.get_result_msg().encode())
372372

373373
if iter_cli_object.api_object.if_request_success() is False and if_multiple_calls is True and iter_cli_object.api_object.api_expected_data_type == ApiCaller.CONST_EXPECTED_DATA_TYPE_JSON:
374374
response_json = iter_cli_object.api_object.get_response_json()
375375
if 'response_code' in response_json and 'Exceeded maximum API requests' in response_json['response']['error']:
376376
raise Exception('Requests exceeded maximum API requests, the rest of the unsubmitted files won\'t be processed, exiting ...')
377377
iter_cli_object.do_post_processing()
378378

379-
if arg_iter['verbose'] is True:
380-
print('\n')
379+
sys.stdout.write('\n')
381380
else:
382381
print(Color.control('No option was selected. To check CLI options, run script in help mode: \'{} -h\''.format(__file__)))
383382

0 commit comments

Comments
 (0)