Changeset 787
- Timestamp:
- Jul 30, 2008, 9:12:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-base/files/usr/sbin/invirt-getconf
r778 r787 36 36 action = 'store_true', 37 37 help = 'force the cache to be regenerated') 38 parser.add_option('-l', '--ls', 39 action = 'store_true', 40 help = 'list node\'s children') 38 41 opts, args = parser.parse_args() 39 42 … … 58 61 except IndexError: raise invirt_exception( 59 62 '%s: index %s out of range' % (progress, component)) 60 print conf 63 if opts.ls: 64 if type(conf) not in [dict, list]: 65 raise invirt_exception( 66 '%s: node has no children (atomic datum)' % progress) 67 if type(conf) == list: 68 for i in xrange(len(conf)): 69 print i 70 else: 71 for k in conf.iterkeys(): 72 print k 73 else: 74 print conf 61 75 except invirt_exception, ex: 62 76 print >> stderr, ex
Note: See TracChangeset
for help on using the changeset viewer.