Allow for non-existent xen-python-path binary
PATCH 1/1 Allow for non-existent xen-python-path binary
# HG changeset patch
# User [email protected]
# 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 <[email protected]>
tools/misc/xend +7 -6
@@ -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