VirtualBox

Changeset 86975 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Nov 25, 2020 2:45:30 PM (4 years ago)
Author:
vboxsync
Message:

ValKit: Shut up python3 compilation errors. bugref:9788

Location:
trunk/src/VBox/ValidationKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/analysis/reporting.py

    r82968 r86975  
    218218    Produce an HTML report on stdout (via print).
    219219    """
    220     print 'not implemented: %s' % (oTest);
     220    print('not implemented: %s' % (oTest));
    221221    return False;
    222222
     
    225225    Produce a ReStructured text report on stdout (via print).
    226226    """
    227     print 'not implemented: %s' % (oTest);
     227    print('not implemented: %s' % (oTest));
    228228    return False;
    229229
     
    276276                if i > 0: sLine += '  ';
    277277                sLine += asLine[i].center(acchColumns[i]);
    278             print sLine;
     278            print(sLine);
    279279
    280280        # Units.
     
    283283            if i > 0: sLine += '  ';
    284284            sLine += oTable.asUnits[i].center(acchColumns[i]);
    285         print sLine;
     285        print(sLine);
    286286
    287287        # Separator line.
     
    290290            if i > 0: sLine += '  '
    291291            sLine += '=' * acchColumns[i];
    292         print sLine;
     292        print(sLine);
    293293
    294294        # The rows.
     
    297297            for i in range(1, len(asColumns)):
    298298                sText += '  ' + asColumns[i].rjust(acchColumns[i]);
    299             print sText;
     299            print(sText);
    300300
    301301    return None;
  • trunk/src/VBox/ValidationKit/analysis/tst-a1.py

    r82968 r86975  
    4848def usage():
    4949    """ Display usage """
    50     print 'usage: %s [options] <testresults.xml> [baseline.xml]' % (sys.argv[0]);
    51     print ''
    52     print 'options:'
    53     print '  --filter <test-sub-string>'
     50    print('usage: %s [options] <testresults.xml> [baseline.xml]' % (sys.argv[0]));
     51    print('')
     52    print('options:')
     53    print('  --filter <test-sub-string>')
    5454    return 1;
    5555
     
    6868            return usage();
    6969        elif asArgs[iArg].startswith('--'):
    70             print 'syntax error: unknown option "%s"' % (asArgs[iArg]);
     70            print('syntax error: unknown option "%s"' % (asArgs[iArg]));
    7171            return usage();
    7272        elif sTestFile is None:
     
    7575            sBaseFile = asArgs[iArg];
    7676        else:
    77             print 'syntax error: too many file names: %s' % (asArgs[iArg])
     77            print('syntax error: too many file names: %s' % (asArgs[iArg]))
    7878            return usage();
    7979        iArg += 1;
  • trunk/src/VBox/ValidationKit/testboxscript/win/fix_stale_refs.py

    r82968 r86975  
    7676            try:
    7777                value = QueryValueEx(hkey_product_properties, 'DisplayName')[0]
    78             except WindowsError, exception:
    79                 if exception.winerror != 2:
     78            except WindowsError as oXcpt:
     79                if oXcpt.winerror != 2:
    8080                    raise
    8181                value = '<unknown>'
     
    8383            products[product_guid] = value
    8484            product_index += 1
    85     except WindowsError, exceptione:
    86         if exceptione.winerror != 259:
    87             print exceptione.strerror + '.', 'error', exceptione.winerror
     85    except WindowsError as oXcpt:
     86        if oXcpt.winerror != 259:
     87            print(oXcpt.strerror + '.', 'error', oXcpt.winerror)
    8888    CloseKey(hkey_products)
    8989
    90     print 'Installed products:'
     90    print('Installed products:')
    9191    for product_key in sorted(products.keys()):
    92         print transpose_guid(product_key), '=', products[product_key]
     92        print(transpose_guid(product_key), '=', products[product_key])
    9393
    94     print
     94    print()
    9595    return products
    9696
     
    127127    missing_products = get_missing_products(hkey_components)
    128128
    129     print 'Missing products refer the following components:'
     129    print('Missing products refer the following components:')
    130130    for product_guid in sorted(missing_products.keys()):
    131131        if product_guid[1:] == '0'*31:
    132132            continue
    133         print 'Product', transpose_guid(product_guid) + ':'
     133        print('Product', transpose_guid(product_guid) + ':')
    134134        for component_guid, component_file in missing_products[product_guid]:
    135             print ' ' + transpose_guid(component_guid), '=', component_file
     135            print(' ' + transpose_guid(component_guid), '=', component_file)
    136136
    137         print 'Remove all references to product', transpose_guid(product_guid) + '? [y/n]'
     137        print('Remove all references to product', transpose_guid(product_guid) + '? [y/n]')
    138138        if strtobool(raw_input().lower()):
    139139            for component_guid, component_file in missing_products[product_guid]:
    140140                hkey_component = OpenKey(hkey_components, component_guid, 0, KEY_ALL_ACCESS)
    141                 print 'Removing reference in ' + transpose_guid(component_guid), '=', component_file
     141                print('Removing reference in ' + transpose_guid(component_guid), '=', component_file)
    142142                DeleteValue(hkey_component, product_guid)
    143143                CloseKey(hkey_component)
    144144        else:
    145             print 'Cancelled removal of product', transpose_guid(product_guid)
     145            print('Cancelled removal of product', transpose_guid(product_guid))
    146146
    147147    CloseKey(hkey_components)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette