john.levon@sun.com
2007-Nov-08 14:43 UTC
[Xen-devel] [PATCH] Allow for non-existent xen-python-path binary
# HG changeset patch # User xen-discuss@opensolaris.org # Date 1194522751 28800 # Node ID 0fa3e8b694c19d4b5422447083c8ac08fe1f750a # Parent 15b2f0bfe7507f68839fda916b559e31f5a2665b Allow for non-existent xen-python-path binary On Solaris, xen-python-path is unnecessary. Allow it to not exist. Signed-off-by: John Levon <john.levon@sun.com> diff --git a/tools/misc/xend b/tools/misc/xend --- a/tools/misc/xend +++ b/tools/misc/xend @@ -31,13 +31,14 @@ import time import time import commands -result = commands.getstatusoutput(os.path.join(os.path.dirname(sys.argv[0]), - ''xen-python-path'')) -if result[0] != 0: - print >>sys.stderr, result[1] - sys.exit(1) +xpp = os.path.join(os.path.dirname(sys.argv[0], ''xen-python-path'')) +if os.path.exists(xpp): + result = commands.getstatusoutput(xpp) + if result[0] != 0: + print >>sys.stderr, result[1] + sys.exit(1) -sys.path.append(result[1]) + sys.path.append(result[1]) from xen.xend.server import SrvDaemon _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel