From 992bbbba1c71d4db239f08f2f110c6a9e1b633c6 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Mon, 1 Sep 2014 00:47:39 -0500 Subject: [PATCH] A bit of cleanup, and call subprocess.Popen with shell=True. --- indra/develop.py | 2 +- indra/lib/python/indra/util/llmanifest.py | 6 +++--- indra/newview/viewer_manifest.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/develop.py b/indra/develop.py index 780f74895..d3a77ae07 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -628,7 +628,7 @@ class WindowsSetup(PlatformSetup): def run(self, command, name=None): '''Run a program. If the program fails, raise an exception.''' - ret = os.system(command.encode('utf-8')) + ret = os.system(command) if ret: if name is None: name = command.split(None, 1)[0] diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index 3305a39d7..625d1456f 100644 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -394,14 +394,14 @@ class LLManifest(object): debugging/informational purpoases, prints out the command's output as it is received.""" print "Running command:", command - fd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + fd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) lines = [] while True: - lines.append(fd.stdout.readline().rstrip('\n')) + lines.append(fd.stdout.readline()) if lines[-1] == '': break else: - print lines[-1], + print lines[-1].rstrip('\n'), output = ''.join(lines) if fd.returncode: raise RuntimeError( diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 9042b65ce..82c26c99c 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -358,11 +358,11 @@ class WindowsManifest(ViewerManifest): if installed_dir != out_path: if install: out_path = installed_dir - result += 'SetOutPath ' + out_path + '\n' + result += 'SetOutPath "' + out_path + '"\n' if install: result += 'File "' + pkg_file + '"\n' else: - result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n' + result += 'Delete "' + wpath(os.path.join('$INSTDIR', rel_file)) + '"\n' # at the end of a delete, just rmdir all the directories if not install: