VirtualBox

Changeset 32447 in vbox


Ignore:
Timestamp:
Sep 13, 2010 2:20:17 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65818
Message:

VboxShell: simplify lookup

File:
1 edited

Legend:

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

    r32120 r32447  
    598598
    599599def machById(ctx,id):
    600     mach = None
    601     for m in getMachines(ctx):
    602         if m.name == id:
    603             mach = m
    604             break
    605         mid = str(m.id)
    606         if mid[0] == '{':
    607             mid = mid[1:-1]
    608         if mid == id:
    609             mach = m
    610             break
     600    try:
     601        mach = ctx['vb'].findMachine(id)
     602    except:
     603        mach = ctx['vb'].getMachine(id)
    611604    return mach
    612605
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