diff options
author | emellor@ewan <emellor@ewan> | 2005-10-04 11:43:38 +0100 |
---|---|---|
committer | emellor@ewan <emellor@ewan> | 2005-10-04 11:43:38 +0100 |
commit | 4ab671f382a15877cccc8545b270edbf655c5720 (patch) | |
tree | a0c01e750c63378984104915644a08c59cf01ea3 /tools/python | |
parent | 90b8e24b71142093412f3f2d9aa30f959010dcc0 (diff) | |
download | xen-4ab671f382a15877cccc8545b270edbf655c5720.tar.gz xen-4ab671f382a15877cccc8545b270edbf655c5720.tar.bz2 xen-4ab671f382a15877cccc8545b270edbf655c5720.zip |
Catch xen.xend.XendProtocol.XendError as well as xen.xend.XendError.XendError.
This horror needs cleaning up -- this is just a stopgap.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/python')
-rw-r--r-- | tools/python/xen/xm/main.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 10b70f1470..b7fa555eb2 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -32,6 +32,7 @@ import warnings warnings.filterwarnings('ignore', category=FutureWarning) import xen.xend.XendError +import xen.xend.XendProtocol from xen.xend import PrettyPrint from xen.xend import sxp @@ -710,6 +711,14 @@ def main(argv=sys.argv): print print "Please report to xen-devel@lists.xensource.com" raise + except xen.xend.XendProtocol.XendError, ex: + if len(args) > 0: + handle_xend_error(argv[1], args[0], ex) + else: + print "Unexpected error:", sys.exc_info()[0] + print + print "Please report to xen-devel@lists.xensource.com" + raise except SystemExit: sys.exit(1) except: |