[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Allow for non-existent xen-python-path binary



# HG changeset patch
# User xen-discuss@xxxxxxxxxxxxxxx
# 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@xxxxxxx>

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.