VirtualBox

Changeset 57440 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 18, 2015 4:15:25 PM (9 years ago)
Author:
vboxsync
Message:

Frontends/VBoxShell: fix output parameter array index (return value is always [0], no matter what the parameter order is) and boolean constants

File:
1 edited

Legend:

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

    r56000 r57440  
    22352235    setParentId = False
    22362236    parentId = ""
    2237     hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false)
     2237    hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, False)
    22382238    print "registered HDD as %s" % (hdd.id)
    22392239    return 0
     
    22542254    loc = args[2]
    22552255    try:
    2256         hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false)
     2256        hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, False)
    22572257    except:
    22582258        print "no HDD with path %s registered" % (loc)
     
    22892289    loc = args[2]
    22902290    try:
    2291         hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false)
     2291        hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, False)
    22922292    except:
    22932293        print "no HDD with path %s registered" % (loc)
     
    23092309        vmunreg = 0
    23102310    try:
    2311         hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false)
     2311        hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, False)
    23122312    except:
    23132313        print "no HDD with path %s registered" % (loc)
     
    23342334    loc = args[1]
    23352335    try:
    2336         hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false)
     2336        hdd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, False)
    23372337    except:
    23382338        print "no HDD with path %s registered" % (loc)
     
    23512351    vbox = ctx['vb']
    23522352    loc = args[1]
    2353     iso = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false)
     2353    iso = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, False)
    23542354    print "registered ISO as %s" % (iso.id)
    23552355    return 0
     
    23632363    loc = args[1]
    23642364    try:
    2365         dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false)
     2365        dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, False)
    23662366    except:
    23672367        print "no DVD with path %s registered" % (loc)
     
    23812381    loc = args[1]
    23822382    try:
    2383         dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false)
     2383        dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, False)
    23842384    except:
    23852385        print "no DVD with path %s registered" % (loc)
     
    24042404    loc = args[2]
    24052405    try:
    2406         dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false)
     2406        dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, False)
    24072407    except:
    24082408        print "no DVD with path %s registered" % (loc)
     
    24272427    loc = args[2]
    24282428    try:
    2429         dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false)
     2429        dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, False)
    24302430    except:
    24312431        print "no DVD with path %s registered" % (loc)
     
    24462446    loc = args[2]
    24472447    try:
    2448         dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false)
     2448        dvd = vbox.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, False)
    24492449    except:
    24502450        print "no DVD with path %s registered" % (loc)
     
    26352635        else:
    26362636            desc = ""
    2637         cmdAnyVm(ctx, mach, lambda ctx, mach, console, args: progressBar(ctx, mach.takeSnapshot(name, desc, true)[1]))
     2637        cmdAnyVm(ctx, mach, lambda ctx, mach, console, args: progressBar(ctx, mach.takeSnapshot(name, desc, True)[0]))
    26382638        return 0
    26392639
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