From: john.levon@sun.com Subject: [PATCH] Allow for non-existent xen-python-path binary Date: Thu, 08 Nov 2007 06:43:15 -0800 Message-ID: <0fa3e8b694c19d4b5422.1194532995@hatchback> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # 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 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