| @@ 549-558 (lines=10) @@ | ||
| 546 | elif isinstance(value, unicode): |
|
| 547 | return value.encode('utf_8') |
|
| 548 | except: |
|
| 549 | pass |
|
| 550 | return value |
|
| 551 | ||
| 552 | ||
| 553 | # show result |
|
| 554 | def show_result(r, options): |
|
| 555 | if 'error' in r: |
|
| 556 | print(r['error']) |
|
| 557 | sys.exit(1) |
|
| 558 | if options.stderr: |
|
| 559 | if 'compiler_output' in r: |
|
| 560 | print('compiler_output:') |
|
| 561 | print(text_transform(r['compiler_output'])) |
|
| @@ 568-576 (lines=9) @@ | ||
| 565 | print('program_output:') |
|
| 566 | print(text_transform(r['program_output'])) |
|
| 567 | if options.xml is None and options.junit is None and 'program_error' in r: |
|
| 568 | sys.stderr.write(text_transform(r['program_error'])) |
|
| 569 | else: |
|
| 570 | if 'compiler_message' in r: |
|
| 571 | print('compiler_message:') |
|
| 572 | print(text_transform(r['compiler_message'])) |
|
| 573 | if 'program_message' in r: |
|
| 574 | print('program_message:') |
|
| 575 | print(text_transform(r['program_message'])) |
|
| 576 | if 'url' in r: |
|
| 577 | print('permlink: ' + r['permlink']) |
|
| 578 | print('url: ' + r['url']) |
|
| 579 | if 'signal' in r: |
|