Improving some scripts; exploit cache better.

This commit is contained in:
Cas Cremers
2011-03-31 15:02:49 +02:00
parent c2662abaef
commit bc667f3f32
4 changed files with 89 additions and 13 deletions

View File

@@ -105,8 +105,7 @@ def safeCommandOutput(cmd):
Meant for short outputs, as output is stored in memory and
not written to a file.
"""
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
p = Popen(cmd, shell=getShell(), stdout=PIPE, stderr=PIPE)
(sout,serr) = p.communicate()
return (p.returncode,sout,serr)
@@ -115,7 +114,7 @@ def safeCommand(cmd):
""" Execute a command with some arguments. Safe cross-platform
version, I hope. """
p = Popen(cmd, shell=True)
p = Popen(cmd, shell=getShell())
sts = p.wait()
return sts