VirtualBox

Ignore:
Timestamp:
May 30, 2011 8:32:40 AM (14 years ago)
Author:
vboxsync
Message:

Frontends/VBoxShell: adapt to 4.0 API change

File:
1 edited

Legend:

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

    r37200 r37245  
    11#!/usr/bin/python
    22#
    3 # Copyright (C) 2009-2010 Oracle Corporation
     3# Copyright (C) 2009-2011 Oracle Corporation
    44#
    55# This file is part of VirtualBox Open Source Edition (OSE), as
     
    216216    return colored(str(m)+'M', 'red')
    217217
    218 def createVm(ctx,name,kind,base):
     218def createVm(ctx,name,kind):
    219219    mgr = ctx['mgr']
    220220    vb = ctx['vb']
    221     mach = vb.createMachine(name, kind, base, "", False)
     221    mach = vb.createMachine("", name, kind, "", False)
    222222    mach.saveSettings()
    223223    print "created machine with UUID",mach.id
     
    10431043
    10441044def createVmCmd(ctx, args):
    1045     if (len(args) < 3 or len(args) > 4):
    1046         print "usage: createvm name ostype <basefolder>"
     1045    if (len(args) != 3):
     1046        print "usage: createvm name ostype"
    10471047        return 0
    10481048    name = args[1]
    10491049    oskind = args[2]
    1050     if len(args) == 4:
    1051         base = args[3]
    1052     else:
    1053         base = ''
    10541050    try:
    10551051         ctx['vb'].getGuestOSType(oskind)
     
    10571053        print 'Unknown OS type:',oskind
    10581054        return 0
    1059     createVm(ctx, name, oskind, base)
     1055    createVm(ctx, name, oskind)
    10601056    return 0
    10611057
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