Code Duplication    Length = 9-10 lines in 2 locations

tools/wandbox/iuwandbox.py 2 locations

@@ 549-558 (lines=10) @@
546
        return int(r['status'])
547
    return 1
548
549
550
# show parameter
551
def show_parameter(r):
552
    if 'compiler' in r:
553
        print('compiler:' + r['compiler'])
554
    if 'options' in r:
555
        print('options:' + r['options'])
556
    if 'compiler-option-raw' in r:
557
        print('compiler-option-raw:' + r['compiler-option-raw'])
558
    if 'runtime-option-raw' in r:
559
        print('runtime-option-raw' + r['runtime-option-raw'])
560
    if 'created-at' in r:
561
        print(r['created-at'])
@@ 568-576 (lines=9) @@
565
    options.stderr = True
566
    if options.runtime_option_raw:
567
        options.runtime_option_raw.append('--iutest_output=' + t + ':' + xml)
568
    else:
569
        options.runtime_option_raw = ['--iutest_output=' + t + ':' + xml]
570
571
572
def run(options):
573
    main_filepath = options.code[0].strip()
574
    if not os.path.exists(main_filepath):
575
        sys.exit(1)
576
    includes = {}
577
    included_files = {}
578
    impliments = {}
579
    code = make_code(main_filepath, options.encoding, options.expand_include, includes, included_files)