VirtualBox

Ignore:
Timestamp:
Jul 26, 2010 12:35:26 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64067
Message:

Python shell: session API updated

File:
1 edited

Legend:

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

    r31071 r31112  
    245245                traceback.print_exc()
    246246         # if session not opened, close doesn't make sense
    247         session.close()
     247        session.unlockMachine()
    248248    else:
    249249       reportError(ctx,progress)
     
    499499    if session.state != ctx['const'].SessionState_Locked:
    500500        print "Session to '%s' in wrong state: %s" %(mach.name, session.state)
    501         session.close()
     501        session.unlockMachine()
    502502        return
    503503    # this could be an example how to handle local only (i.e. unavailable
     
    505505    if ctx['remote'] and cmd == 'some_local_only_command':
    506506        print 'Trying to use local only functionality, ignored'
    507         session.close()
     507        session.unlockMachine()
    508508        return
    509509    console=session.console
     
    531531            traceback.print_exc()
    532532
    533     session.close()
     533    session.unlockMachine()
    534534
    535535
     
    13621362
    13631363    mach.saveSettings()
    1364     session.close()
     1364    session.unlockMachine()
    13651365
    13661366    return 0
     
    25412541        if rc == 0:
    25422542            mach.saveSettings()
    2543         session.close()
     2543        session.unlockMachine()
    25442544    elif report is not None:
    25452545        for r in report:
     
    27172717    if report is not None:
    27182718        print '%s nic %d %s: %s' % (vm.name, nicnum, args[3], report)
    2719     session.close()
     2719    session.unlockMachine()
    27202720    return 0
    27212721
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