Hi I'm new to Fabric and am having trouble separating stderr from stdout.
This is with Fabric 1.10.0 on Python 2.7.3:

>>> from fabric.api import *
>>> env.host_string = 'localhost'
>>> env.port = 22
>>> env.username = 'myusername'
>>> env.password = 'mypassword'
>>> env.warn_only = True
>>> result = run('somebadcommand')
[localhost] run: somebadcommand
[localhost] out: /bin/bash: somebadcommand: command not found
[localhost] out:

Warning: run() received nonzero return code 127 while executing
'somebadcommand'!

>>> result.stdout
'/bin/bash: somebadcommand: command not found'
>>> result.stderr
''
>>> result = run('somebadcommand',combine_stderr=False)
[localhost] run: somebadcommand
[localhost] out: /bin/bash: somebadcommand: command not found
[localhost] out:

Warning: run() received nonzero return code 127 while executing
'somebadcommand'!

>>> result.stdout
'/bin/bash: somebadcommand: command not found'
>>> result.stderr
''

​I expected the second attempt to return stderr to result.stderr instead of
result.stdout​

Any help would be greatly appreciated.
Thanks-
Lee
_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to