ia64/xen-unstable

changeset 16359:0ebac8576495

xend: Allow for non-existent xen-python-path binary.
On Solaris, xen-python-path is unnecessary.

Signed-off-by: John Levon <john.levon@sun.com>
author Keir Fraser <keir@xensource.com>
date Thu Nov 08 15:32:14 2007 +0000 (2007-11-08)
parents c0bdfda5183d
children 3e3b0418905f
files tools/misc/xend
line diff
     1.1 --- a/tools/misc/xend	Thu Nov 08 14:50:01 2007 +0000
     1.2 +++ b/tools/misc/xend	Thu Nov 08 15:32:14 2007 +0000
     1.3 @@ -33,13 +33,14 @@ import signal
     1.4  import time
     1.5  import commands
     1.6  
     1.7 -result = commands.getstatusoutput(os.path.join(os.path.dirname(sys.argv[0]),
     1.8 -                                               'xen-python-path'))
     1.9 -if result[0] != 0:
    1.10 -    print >>sys.stderr, result[1]
    1.11 -    sys.exit(1)
    1.12 +xpp = os.path.join(os.path.dirname(sys.argv[0], 'xen-python-path'))
    1.13 +if os.path.exists(xpp):
    1.14 +    result = commands.getstatusoutput(xpp)
    1.15 +    if result[0] != 0:
    1.16 +        print >>sys.stderr, result[1]
    1.17 +        sys.exit(1)
    1.18  
    1.19 -sys.path.append(result[1])
    1.20 +    sys.path.append(result[1])
    1.21  
    1.22  from xen.xend.server import SrvDaemon
    1.23