ia64/xen-unstable

changeset 11656:e57815fcc352

[XM] Set proper return code for exceptions in xm, catch ACMError.

Signed-off-by: Alastair Tse <atse@xensource.com>
author atse@norwich.uk.xensource.com
date Thu Sep 28 12:03:10 2006 +0100 (2006-09-28)
parents c40ea583941c
children 911b7c6d03ea
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Thu Sep 28 11:47:33 2006 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Thu Sep 28 12:03:10 2006 +0100
     1.3 @@ -1478,10 +1478,15 @@ def main(argv=sys.argv):
     1.4          except (ValueError, OverflowError):
     1.5              err("Invalid argument.")
     1.6              usage(argv[1])
     1.7 +            sys.exit(1)
     1.8          except OptionError, e:
     1.9              err(str(e))
    1.10              usage(argv[1])
    1.11              print e.usage()
    1.12 +            sys.exit(1)
    1.13 +        except security.ACMError, e:
    1.14 +            err(str(e))
    1.15 +            sys.exit(1)
    1.16          except:
    1.17              print "Unexpected error:", sys.exc_info()[0]
    1.18              print