From: Zooko O'Whielacronx Date: Thu, 5 Jun 2008 22:59:45 +0000 (-0700) Subject: setup: quote the results of misc/find_trial.py so that they can be passed through... X-Git-Tag: allmydata-tahoe-1.1.0~44 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/provisioning?a=commitdiff_plain;h=b06ba642146adca2da222e75bbadd2486e1445cb;p=tahoe-lafs%2Ftahoe-lafs.git setup: quote the results of misc/find_trial.py so that they can be passed through a shell even if they contain spaces --- diff --git a/misc/find_trial.py b/misc/find_trial.py index 120d01b4..39c1553f 100644 --- a/misc/find_trial.py +++ b/misc/find_trial.py @@ -9,10 +9,10 @@ def find_exe(exename): This is a kludge. - @return: a list containing one element which is the path to the exename - (if it is thought to be executable), or else the first element being - sys.executable and the second element being the path to the - exename + ".py", or else return False if one can't be found + @return: a list containing one element which is the quoted path to the + exename (if it is thought to be executable), or else the first element + being quoted sys.executable and the second element being the quoted path + to the exename + ".py", or else return False if one can't be found """ exes = which(exename) exe = exes and exes[0] @@ -21,9 +21,9 @@ def find_exe(exename): if os.path.exists(exe): path, ext = os.path.splitext(exe) if ext.lower() in [".exe", ".bat",]: - cmd = [exe,] + cmd = ['"' + exe + '"',] else: - cmd = [sys.executable, exe,] + cmd = ['"' + sys.executable + '"', '"' + exe + '"',] return cmd else: return False