# HG changeset patch
# User emellor@ewan
# Node ID 5db9a237f8ce867ee2a8fa4b19cf3074134ad827
# Parent d443f03f8be0f40af055543bf3c1ae46aac4d23e
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 d443f03f8be0 -r 5db9a237f8ce tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py Sun Oct 2 17:24:41 2005
+++ b/tools/python/xen/xm/main.py Mon Oct 3 15:33:09 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
|