VirtualBox

Ignore:
Timestamp:
Jul 5, 2018 2:44:31 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123468
Message:

Main/*: From now on any valid UTF8 string is considered a valid guest OS type. Of course not all of them are known, so the API clients must be prepared to deal with not having a matching IGuestOSType object.
Frontends/VBoxManage+VBoxShell: adjust to deal with the change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxShell/vboxshell.py

    r71179 r72919  
    962962    if mach == None:
    963963        return 0
    964     vmos = ctx['vb'].getGuestOSType(mach.OSTypeId)
     964    try:
     965        vmos = ctx['vb'].getGuestOSType(mach.OSTypeId)
     966    except:
     967        vmos = None
    965968    print(" One can use setvar <mach> <var> <value> to change variable, using name in [].")
    966969    print("  Name [name]: %s" % (colVm(ctx, mach.name)))
    967970    print("  Description [description]: %s" % (mach.description))
    968971    print("  ID [n/a]: %s" % (mach.id))
    969     print("  OS Type [via OSTypeId]: %s" % (vmos.description))
     972    print("  OS Type [via OSTypeId]: %s" % (vmos.description if vmos is not None else mach.OSTypeId))
    970973    print("  Firmware [firmwareType]: %s (%s)" % (asEnumElem(ctx, "FirmwareType", mach.firmwareType), mach.firmwareType))
    971974    print()
Note: See TracChangeset for help on using the changeset viewer.

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