WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Catch xen.xend.XendProtocol.XendError as well as xen.xen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Catch xen.xend.XendProtocol.XendError as well as xen.xend.XendError.XendError.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 Oct 2005 10:46:17 +0000
Delivery-date: Tue, 04 Oct 2005 10:44:57 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@ewan
# Node ID 4c4dbbda367ed9eb6004a40baa6cb27ba551c963
# Parent  5a3d5f9ef44e6733e5f5098b378867ef681cb4ee
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@xxxxxxxxxxxxx>

diff -r 5a3d5f9ef44e -r 4c4dbbda367e tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Oct  4 10:42:06 2005
+++ b/tools/python/xen/xm/main.py       Tue Oct  4 10:43:38 2005
@@ -32,6 +32,7 @@
 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 @@
                 print
                 print "Please report to xen-devel@xxxxxxxxxxxxxxxxxxx"
                 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@xxxxxxxxxxxxxxxxxxx"
+                raise
         except SystemExit:
             sys.exit(1)
         except:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Catch xen.xend.XendProtocol.XendError as well as xen.xend.XendError.XendError., Xen patchbot -unstable <=