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-devel

[Xen-devel] xm: catch TypeError if xenconsole is nonexistent

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] xm: catch TypeError if xenconsole is nonexistent
From: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Date: Wed, 28 Apr 2010 18:32:43 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 28 Apr 2010 03:33:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 3.0a1 (Windows/2008050715)
If command xenconsole is nonexistent:
# xm console pv1
Unexpected error: exceptions.TypeError

Please report to xen-devel@xxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
  File "/usr/sbin/xm", line 7, in ?
    main.main(sys.argv)
  File "usr/lib64/python2.4/site-packages/xen/xm/main.py", line 3939, in main
...

Catch this error.
------------

catch TypeError if xenconsole is nonexistent

Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>

diff -r c87ec146229a -r b696c19ee132 tools/python/xen/util/auxbin.py
--- a/tools/python/xen/util/auxbin.py   Fri Apr 23 15:04:26 2010 +0100
+++ b/tools/python/xen/util/auxbin.py   Thu Apr 29 01:48:00 2010 +0800
@@ -28,7 +28,7 @@
         a.extend(args)
     try:
         os.execv(exepath, a)
-    except OSError, exn:
+    except (OSError, TypeError), exn:
         print exepath, ": ", exn
         sys.exit(1)
 


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] xm: catch TypeError if xenconsole is nonexistent, Yu Zhiguo <=