Cannot find Xen Python modules
PATCH 1/1 Cannot find Xen Python modules
Hi;
With xen-3.1.0 on Pardus 2007, "/usr/sbin/xend start" returns "Cannot find Xen Python modules." cause Xen Python modules installed
into "/usr/lib/python2.4/site-packages/"
Following patch adds site-packages into search path
Signed-off-by S.Çağlar Onur <[email protected]>
tools/misc/xen-python-path +7 -6
@@ -30,12 +30,13 @@ import sys for p in ['python%s' % sys.version[:3], 'python']: for l in ['/usr/lib64', '/usr/lib']: - d = os.path.join(l, p) - if os.path.exists(os.path.join(d, AUXBIN)): - sys.path.append(d) - import xen.util.auxbin - print os.path.join(xen.util.auxbin.libpath(), p) - sys.exit(0) + for k in ['', 'site-packages/']: + d = os.path.join(l, p, k) + if os.path.exists(os.path.join(d, AUXBIN)): + sys.path.append(d) + import xen.util.auxbin + print os.path.join(xen.util.auxbin.libpath(), p) + sys.exit(0) print >>sys.stderr, "Cannot find Xen Python modules." sys.exit(1)
Cheers
Signature · 4 lines
S.Çağlar Onur <[email protected]> http://cekirdek.pardus.org.tr/~caglar/ Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel