LGTM, thanks

On Wed, 26 Aug 2015 at 12:32 'Klaus Aehlig' via ganeti-devel <
[email protected]> wrote:

> The notion of a file-like objects serves as an interface
> for read/write operations in python. However, this interface
> contains optional parts, like the fileno() function; in fact,
> file-like objects not having a real file descriptor explicitly
> should not provide this method. As, RunCmd, by indirectly
> calling subprocess.Popen, relies input_fd providing fileno(),
> not all file-like objects can be passed as argument for
> input_fd (e.g., StringIO objects cannot). Change the doc string
> to be precise about this.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  lib/utils/process.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lib/utils/process.py b/lib/utils/process.py
> index 268ff54..5933929 100644
> --- a/lib/utils/process.py
> +++ b/lib/utils/process.py
> @@ -185,7 +185,8 @@ def RunCmd(cmd, env=None, output=None, cwd="/",
> reset_env=False,
>    @type noclose_fds: list
>    @param noclose_fds: list of additional (fd >=3) file descriptors to
> leave
>                        open for the child process
> -  @type input_fd: C{file}-like object or numeric file descriptor
> +  @type input_fd: C{file}-like object containing an actual file descriptor
> +                  or numeric file descriptor
>    @param input_fd: File descriptor for process' standard input
>    @type postfork_fn: Callable receiving PID as parameter
>    @param postfork_fn: Callback run after fork but before timeout
> @@ -526,7 +527,8 @@ def _RunCmdPipe(cmd, env, via_shell, cwd, interactive,
> timeout, noclose_fds,
>    @type noclose_fds: list
>    @param noclose_fds: list of additional (fd >=3) file descriptors to
> leave
>                        open for the child process
> -  @type input_fd: C{file}-like object or numeric file descriptor
> +  @type input_fd: C{file}-like object containing an actual file descriptor
> +                  or numeric file descriptor
>    @param input_fd: File descriptor for process' standard input
>    @type postfork_fn: Callable receiving PID as parameter
>    @param postfork_fn: Function run after fork but before timeout
> --
> 2.5.0.457.gab17608
>
> --

Helga Velroyen
Software Engineer
[email protected]

Google Germany GmbH
Dienerstraße 12
80331 München

Geschäftsführer: Graham Law, Christine Elizabeth Flores
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

This e-mail is confidential. If you are not the right addressee please do
not forward it, please inform the sender, and please erase this e-mail
including any attachments. Thanks.

Reply via email to