|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Print error messages to stderr. Remove unused handle_xen
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 1d0bd5ea2c870944980dd45f0a93fb278af2e8f6
# Parent 53ded2201b7f9737faa4edffd86a870e56b2d704
Print error messages to stderr. Remove unused handle_xend_error.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
diff -r 53ded2201b7f -r 1d0bd5ea2c87 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py Thu Mar 30 23:13:33 2006
+++ b/tools/python/xen/xm/main.py Thu Mar 30 23:14:09 2006
@@ -291,18 +291,6 @@
def err(msg):
print >>sys.stderr, "Error:", msg
-def handle_xend_error(cmd, args, ex):
- non_option = filter(lambda x: x[0] != '-', args)
- dom = len(non_option) > 0 and non_option[0] or None
-
- error = str(ex)
- if error == "Not found" and dom != None:
- err("Domain '%s' not found when running 'xm %s'" % (dom, cmd))
- else:
- err(error)
-
- sys.exit(1)
-
#########################################################################
#
@@ -1106,9 +1094,10 @@
sys.exit(1)
except xmlrpclib.Fault, ex:
if ex.faultCode == xen.xend.XendClient.ERROR_INVALID_DOMAIN:
- print "Error: the domain '%s' does not exist." % ex.faultString
+ print >>sys.stderr, (
+ "Error: the domain '%s' does not exist." % ex.faultString)
else:
- print "Error: %s" % ex.faultString
+ print >>sys.stderr, "Error: %s" % ex.faultString
sys.exit(1)
except:
print "Unexpected error:", sys.exc_info()[0]
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Print error messages to stderr. Remove unused handle_xend_error.,
Xen patchbot -unstable <=
|
|
|
|
|