ia64/xen-unstable

changeset 6244:cb5648ba5821

fail nicely when passing unknown option to xm list

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vh249@arcadians.cl.cam.ac.uk
date Thu Aug 18 11:45:54 2005 +0000 (2005-08-18)
parents 1a94949348ff
children d0a8939ac826
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Thu Aug 18 10:41:55 2005 +0000
     1.2 +++ b/tools/python/xen/xm/main.py	Thu Aug 18 11:45:54 2005 +0000
     1.3 @@ -200,7 +200,11 @@ def xm_migrate(args):
     1.4  def xm_list(args):
     1.5      use_long = 0
     1.6      show_vcpus = 0
     1.7 -    (options, params) = getopt(args, 'lv', ['long','vcpus'])
     1.8 +    try:
     1.9 +        (options, params) = getopt(args, 'lv', ['long','vcpus'])
    1.10 +    except GetoptError, opterr:
    1.11 +        err(opterr)
    1.12 +        sys.exit(1)
    1.13      
    1.14      n = len(params)
    1.15      for (k, v) in options: