fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Capturing stdout and stderr in 1.0.0


From: Matthew Woodcraft
Subject: [Fab-user] Capturing stdout and stderr in 1.0.0
Date: Sat, 19 Mar 2011 12:59:36 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.16) Gecko/20110307 Icedove/3.0.11

I'm trying out Fabric 1.0.0. I haven't used older versions.

>From the documentation, I gather that if I want to capture stdout from a
remote command without stderr mixed in, I should use pty=False,
combine_stderr=False.

But if I try this, the stderr output is mixed in with stdout anyway: the
following command prints
stdout:'cat: /shouldnotappear: No such file or directory\nshouldappear'
stderr:''

  from fabric.api import run
  def test_stderr():
      r = run(
          "cat /shouldnotappear; echo shouldappear",
          pty=False, combine_stderr=False)
      print "stdout:%r" % r.stdout
      print "stderr:%r" % r.stderr

Do I need to do something more to prevent Fabric combining the streams?

-M-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]