summaryrefslogtreecommitdiff
path: root/cpp/demo/IceGrid/secure/makecerts.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-12-10 17:30:25 +0100
committerBenoit Foucher <benoit@zeroc.com>2014-12-10 17:30:25 +0100
commita784b7900e21d8213787f29028317384ba42a489 (patch)
tree8a24136d30777f317e1cc3d2103c1d1e60750c3d /cpp/demo/IceGrid/secure/makecerts.py
parentFixed (ICE-6115) - extra new lines in testicedist.py windows output (diff)
downloadice-a784b7900e21d8213787f29028317384ba42a489.tar.bz2
ice-a784b7900e21d8213787f29028317384ba42a489.tar.xz
ice-a784b7900e21d8213787f29028317384ba42a489.zip
Fixed ICE-6123: demo/IceGrid/secure can't find python executable
Diffstat (limited to 'cpp/demo/IceGrid/secure/makecerts.py')
-rwxr-xr-xcpp/demo/IceGrid/secure/makecerts.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/demo/IceGrid/secure/makecerts.py b/cpp/demo/IceGrid/secure/makecerts.py
index 4492350a6aa..d50f444bf6e 100755
--- a/cpp/demo/IceGrid/secure/makecerts.py
+++ b/cpp/demo/IceGrid/secure/makecerts.py
@@ -13,6 +13,13 @@ import os, sys, shutil, glob
def runIceca(args):
os.environ['PYTHONUNBUFFERED'] = '1'
command = 'iceca %s' % args
+
+ # Look for iceca in the PATH, if found, execute it with the
+ # current python executable.
+ for path in os.environ.get("PATH", "").split(os.pathsep):
+ if os.path.exists(os.path.join(path, "iceca")):
+ command = '%s "%s" %s' % (sys.executable, os.path.join(path, "iceca"), args)
+
if os.system(command):
sys.exit(1)