[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.0.3-testing] [XM] Set proper return code for exceptions in xm, catch ACMError.



# HG changeset patch
# User atse@xxxxxxxxxxxxxxxxxxxxxxxx
# Date 1159441390 -3600
# Node ID e57815fcc352e28332d4feff9c32227ebce99ef6
# Parent  c40ea583941c91e4f1eff573497ab9e37424b966
[XM] Set proper return code for exceptions in xm, catch ACMError.

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |    5 +++++
 1 files changed, 5 insertions(+)

diff -r c40ea583941c -r e57815fcc352 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Thu Sep 28 11:47:33 2006 +0100
+++ b/tools/python/xen/xm/main.py       Thu Sep 28 12:03:10 2006 +0100
@@ -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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.