From 5f5e141589523c3ddf8bbd611f358950126977ef Mon Sep 17 00:00:00 2001 From: Peter Astrand Date: Sun, 5 Dec 2004 20:15:36 +0000 Subject: [PATCH] Changed signature of call function to avoid confusion: this 'args' is not the same as the one to the Popen constructor --- Doc/lib/libsubprocess.tex | 2 +- Lib/subprocess.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/lib/libsubprocess.tex b/Doc/lib/libsubprocess.tex index 77bd83e7c29..308c1dd40f9 100644 --- a/Doc/lib/libsubprocess.tex +++ b/Doc/lib/libsubprocess.tex @@ -122,7 +122,7 @@ process. (Windows only) This module also defines one shortcut function: -\begin{funcdesc}{call}{*args, **kwargs} +\begin{funcdesc}{call}{*popenargs, **kwargs} Run command with arguments. Wait for command to complete, then return the \member{returncode} attribute. diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 9e326fbea42..40b04fe39ff 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -125,7 +125,7 @@ class Popen(args, bufsize=0, executable=None, This module also defines two shortcut functions: -call(*args, **kwargs): +call(*popenargs, **kwargs): Run command with arguments. Wait for command to complete, then return the returncode attribute. @@ -417,7 +417,7 @@ def _cleanup(): STDOUT = -2 -def call(*args, **kwargs): +def call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete, then return the returncode attribute. @@ -425,7 +425,7 @@ def call(*args, **kwargs): retcode = call(["ls", "-l"]) """ - return Popen(*args, **kwargs).wait() + return Popen(*popenargs, **kwargs).wait() def list2cmdline(seq):