Changeset 551 for trunk/packages


Ignore:
Timestamp:
Jun 1, 2008, 6:52:02 PM (16 years ago)
Author:
broder
Message:

Use YAML on listvms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-listvms

    r533 r551  
    55sys.path.insert(0, '/usr/lib/xen-3.1-1/lib/python')
    66from xen.lowlevel.xs import xs
     7import yaml
    78
    89trans = xs()
     
    3637if __name__ == '__main__':
    3738    vms = live_vms()
    38     if '--pickle' in sys.argv[1:]:
    39         import cPickle
    40         cPickle.dump(vms, sys.stdout, cPickle.HIGHEST_PROTOCOL)
    41     else:
    42         print vms
     39    print yaml.safe_dump(vms, default_flow_style=False)
Note: See TracChangeset for help on using the changeset viewer.