String commands require shell=True.
This commit is contained in:
parent
d1b334765b
commit
dc4dc34624
@ -89,15 +89,17 @@ def safeCommandOutput(cmd):
|
|||||||
Meant for short outputs, as output is stored in memory and
|
Meant for short outputs, as output is stored in memory and
|
||||||
not written to a file.
|
not written to a file.
|
||||||
"""
|
"""
|
||||||
p = Popen(cmd, shell=getShell(), stdout=PIPE, stderr=PIPE)
|
|
||||||
|
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
|
||||||
(sout,serr) = p.communicate()
|
(sout,serr) = p.communicate()
|
||||||
|
|
||||||
return (p.returncode,sout,serr)
|
return (p.returncode,sout,serr)
|
||||||
|
|
||||||
def safeCommand(cmd):
|
def safeCommand(cmd):
|
||||||
""" Execute a command with some arguments. Safe cross-platform
|
""" Execute a command with some arguments. Safe cross-platform
|
||||||
version, I hope. """
|
version, I hope. """
|
||||||
|
|
||||||
p = Popen(cmd, shell=getShell())
|
p = Popen(cmd, shell=True)
|
||||||
sts = p.wait()
|
sts = p.wait()
|
||||||
|
|
||||||
return sts
|
return sts
|
||||||
|
Loading…
Reference in New Issue
Block a user