From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [Xen-staging] [xen-unstable] xend: Allow for non-existent xen-python-path binary. Date: Thu, 08 Nov 2007 09:17:31 -0700 Message-ID: <1194538651.31834.269.camel@bling> References: <200711081534.lA8FYN7l005628@latara.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200711081534.lA8FYN7l005628@latara.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , John Levon Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Thu, 2007-11-08 at 15:34 +0000, Xen staging patchbot-unstable wrote: > # HG changeset patch > # User Keir Fraser > # Date 1194535934 0 > # Node ID 0ebac857649591de0e1b57605b054552afb03297 > # Parent c0bdfda5183d5e9dca5c9bc7a68a6cf40e3f6c58 > xend: Allow for non-existent xen-python-path binary. > On Solaris, xen-python-path is unnecessary. This completely breaks xend for me: # xend start Traceback (most recent call last): File "/usr/sbin/xend", line 36, in ? xpp = os.path.join(os.path.dirname(sys.argv[0], 'xen-python-path')) TypeError: dirname() takes exactly 1 argument (2 given) Alex > --- > tools/misc/xend | 13 +++++++------ > 1 files changed, 7 insertions(+), 6 deletions(-) > > diff -r c0bdfda5183d -r 0ebac8576495 tools/misc/xend > --- a/tools/misc/xend Thu Nov 08 14:50:01 2007 +0000 > +++ b/tools/misc/xend Thu Nov 08 15:32:14 2007 +0000 > @@ -33,13 +33,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-staging mailing list > Xen-staging@lists.xensource.com > http://lists.xensource.com/xen-staging > -- Alex Williamson HP Open Source & Linux Org.