Changeset 788 for trunk/packages/sipb-xen-base/files/usr/sbin
- Timestamp:
- Jul 30, 2008, 9:21:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-base/files/usr/sbin/invirt-getconf
r787 r788 41 41 opts, args = parser.parse_args() 42 42 43 try: [key] = args 44 except: raise invirt_exception(__doc__.strip()) 43 if len(args) > 1: 44 raise invirt_exception(__doc__.strip()) 45 elif args and args[0]: 46 components = args[0].split('.') 47 else: 48 components = [] 45 49 46 50 conf = load(opts.src, opts.cache, opts.refresh) 47 components = key.split('.')48 51 for i, component in enumerate(components): 49 52 progress = '.'.join(components[:i]) … … 61 64 except IndexError: raise invirt_exception( 62 65 '%s: index %s out of range' % (progress, component)) 66 63 67 if opts.ls: 64 68 if type(conf) not in [dict, list]:
Note: See TracChangeset
for help on using the changeset viewer.