Changeset 789 for trunk/packages
- Timestamp:
- Jul 30, 2008, 9:27:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-base/files/usr/sbin/invirt-getconf
r788 r789 18 18 19 19 from invirt.config import load 20 from sys import argv, exit, stderr 20 from sys import argv, exit, stderr, stdout 21 21 from optparse import OptionParser 22 22 … … 51 51 for i, component in enumerate(components): 52 52 progress = '.'.join(components[:i]) 53 if type(conf) not in [dict, list]:53 if type(conf) not in (dict, list): 54 54 raise invirt_exception( 55 55 '%s: node has no children (atomic datum)' % progress) … … 66 66 67 67 if opts.ls: 68 if type(conf) not in [dict, list]:68 if type(conf) not in (dict, list): 69 69 raise invirt_exception( 70 70 '%s: node has no children (atomic datum)' % progress) … … 76 76 print k 77 77 else: 78 print conf 78 if type(conf) not in (dict, list): 79 print conf 80 else: 81 import yaml 82 yaml.safe_dump(conf, stdout, default_flow_style=False) 79 83 except invirt_exception, ex: 80 84 print >> stderr, ex
Note: See TracChangeset
for help on using the changeset viewer.