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] Added exception handler for ProtocolError.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Added exception handler for ProtocolError.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Mar 2006 13:48:11 +0000
Delivery-date: Thu, 23 Mar 2006 13:50:11 +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@xxxxxxxxxxxxxxxxxxxxxx
# Node ID c1bb4eb565296bdb00aed84fcc877befbcebd8e9
# Parent  b55ca95fdc846a5db9f30ba1c5d065fe898f88e7
Added exception handler for ProtocolError.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r b55ca95fdc84 -r c1bb4eb56529 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Thu Mar 23 10:55:56 2006
+++ b/tools/python/xen/xm/main.py       Thu Mar 23 10:58:19 2006
@@ -1102,6 +1102,12 @@
             else:
                 err("Error connecting to xend: %s." % ex[1])
             sys.exit(1)
+        except xmlrpclib.ProtocolError, ex:
+            if os.geteuid() != 0:
+                err("Most commands need root access.  Please try again as 
root.")
+            else:
+                err("Error connecting to xend: %s." % ex.errmsg)
+            sys.exit(1)
         except SystemExit:
             sys.exit(1)
         except xmlrpclib.Fault, ex:

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

<Prev in Thread] Current Thread [Next in Thread>