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] Move the import for XendError, and use a bare import, n

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Move the import for XendError, and use a bare import, not a from...import.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 Oct 2005 01:32:12 +0000
Delivery-date: Tue, 04 Oct 2005 01:29: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 7f42935cb4b0befbd89f4e4d14c4f169f7880e26
# Parent  0e1838de9db844c4376336065f0bcf03e4f6f46c
Move the import for XendError, and use a bare import, not a from...import.
This should silence the error message when the program is terminated during
startup.

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

diff -r 0e1838de9db8 -r 7f42935cb4b0 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Oct  4 01:21:28 2005
+++ b/tools/python/xen/xm/main.py       Tue Oct  4 01:25:04 2005
@@ -30,9 +30,14 @@
 import socket
 import warnings
 warnings.filterwarnings('ignore', category=FutureWarning)
+
+import xen.xend.XendError
+
 from xen.xend import PrettyPrint
 from xen.xend import sxp
 from xen.xm.opts import *
+
+
 shorthelp = """Usage: xm <subcommand> [args]
     Control, list, and manipulate Xen guest instances
 
@@ -687,7 +692,6 @@
     args = argv[2:]
     if cmd:
         try:
-            from xen.xend.XendClient import XendError
             rc = cmd(args)
             if rc:
                 usage()
@@ -698,7 +702,7 @@
         except IOError:
             err("Most commands need root access.  Please try again as root")
             sys.exit(1)
-        except XendError, ex:
+        except xen.xend.XendError.XendError, ex:
             if len(args) > 0:
                 handle_xend_error(argv[1], args[0], ex)
             else:
@@ -719,6 +723,3 @@
 
 if __name__ == "__main__":
     main()
-
-
-

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

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