[FIX] tools.misc: correct argument to subprocess.Popen (via xrg, analysis/patch courtesy of Michael Telahun Makonnen)
lp bug: https://launchpad.net/bugs/685115 fixed lp bug: https://launchpad.net/bugs/684661 fixed bzr revid: odo@openerp.com-20101207170551-o19ab06g1h2x3ygz
This commit is contained in:
parent
8233e8b505
commit
592d666e51
|
@ -141,15 +141,15 @@ def exec_pg_command(name, *args):
|
|||
prog = find_pg_tool(name)
|
||||
if not prog:
|
||||
raise Exception('Couldn\'t find %s' % name)
|
||||
args2 = (os.path.basename(prog),) + args
|
||||
args2 = (prog,) + args
|
||||
|
||||
return subprocess.call(args2, executable=prog)
|
||||
return subprocess.call(args2)
|
||||
|
||||
def exec_pg_command_pipe(name, *args):
|
||||
prog = find_pg_tool(name)
|
||||
if not prog:
|
||||
raise Exception('Couldn\'t find %s' % name)
|
||||
pop = subprocess.Popen(args, executable=prog, shell=True, bufsize= -1,
|
||||
pop = subprocess.Popen((prog,) + args, bufsize= -1,
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True)
|
||||
return (pop.stdin, pop.stdout)
|
||||
|
||||
|
@ -157,7 +157,7 @@ def exec_command_pipe(name, *args):
|
|||
prog = find_in_path(name)
|
||||
if not prog:
|
||||
raise Exception('Couldn\'t find %s' % name)
|
||||
pop = subprocess.Popen(args, executable=prog, shell=True, bufsize= -1,
|
||||
pop = subprocess.Popen((prog,) + args, bufsize= -1,
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True)
|
||||
return (pop.stdin, pop.stdout)
|
||||
|
||||
|
|
Loading…
Reference in New Issue