Yu Zhiguo
2010-Apr-28 10:32 UTC
[Xen-devel] xm: catch TypeError if xenconsole is nonexistent
If command xenconsole is nonexistent:
# xm console pv1
Unexpected error: exceptions.TypeError
Please report to xen-devel@lists.xensource.com
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@cn.fujitsu.com>
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@lists.xensource.com
http://lists.xensource.com/xen-devel