aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authoremellor@ewan <emellor@ewan>2005-10-03 16:33:09 +0100
committeremellor@ewan <emellor@ewan>2005-10-03 16:33:09 +0100
commit81fd7244f529fcd3295befa8280ccf9669b2b09a (patch)
treeb75cca4f639274b9b5eb6d96a56bbe7e17dffe00 /tools
parent54795b5c539f1e837557ef3d535d2e45f4ec978f (diff)
downloadxen-81fd7244f529fcd3295befa8280ccf9669b2b09a.tar.gz
xen-81fd7244f529fcd3295befa8280ccf9669b2b09a.tar.bz2
xen-81fd7244f529fcd3295befa8280ccf9669b2b09a.zip
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@xensource.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xm/main.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py
index 648c5968a7..10b70f1470 100644
--- a/tools/python/xen/xm/main.py
+++ b/tools/python/xen/xm/main.py
@@ -30,9 +30,14 @@ from getopt import getopt
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 @@ def main(argv=sys.argv):
args = argv[2:]
if cmd:
try:
- from xen.xend.XendClient import XendError
rc = cmd(args)
if rc:
usage()
@@ -698,7 +702,7 @@ def main(argv=sys.argv):
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 @@ def main(argv=sys.argv):
if __name__ == "__main__":
main()
-
-
-