VirtualBox

Changeset 28411 in vbox


Ignore:
Timestamp:
Apr 16, 2010 12:12:41 PM (15 years ago)
Author:
vboxsync
Message:

python shell: interesting misfeature of python strings, visible with WS connection

File:
1 edited

Legend:

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

    r28378 r28411  
    545545    return 0
    546546
     547def asEnumElem(ctx,enum,elem):
     548    all = ctx['ifaces'].all_values(enum)
     549    for e in all.keys():
     550        if str(elem) == str(all[e]):
     551            return e
     552    return "<unknown>"
     553
    547554def listCmd(ctx, args):
    548555    for m in getMachines(ctx, True):
     
    553560        print "%sMachine '%s' [%s], state=%s" %(tele,m.name,m.id,asEnumElem(ctx,"SessionState", m.sessionState))
    554561    return 0
    555 
    556 def asEnumElem(ctx,enum,elem):
    557     all = ctx['ifaces'].all_values(enum)
    558     for e in all.keys():
    559         if elem == all[e]:
    560             return e
    561     return "<unknown>"
    562562
    563563def infoCmd(ctx,args):
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