WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Allow for non-existent xen-python-path binary
From: john.levon@xxxxxxx
Date: Thu, 08 Nov 2007 06:43:15 -0800
Delivery-date: Thu, 08 Nov 2007 06:43:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Allow for non-existent xen-python-path binary, john . levon <=