mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[XM] Set proper return code for exceptions in xm, catch ACMError.
Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
cc4761e041
commit
9bb76d3442
1 file changed
+5
@@ -1478,10 +1478,15 @@ def main(argv=sys.argv):
|
||||
except (ValueError, OverflowError):
|
||||
err("Invalid argument.")
|
||||
usage(argv[1])
|
||||
sys.exit(1)
|
||||
except OptionError, e:
|
||||
err(str(e))
|
||||
usage(argv[1])
|
||||
print e.usage()
|
||||
sys.exit(1)
|
||||
except security.ACMError, e:
|
||||
err(str(e))
|
||||
sys.exit(1)
|
||||
except:
|
||||
print "Unexpected error:", sys.exc_info()[0]
|
||||
print
|
||||
|
||||