Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

local() raises an UnboundLocalError if output.stdout or output.stderr is unset #301

Closed
bitprophet opened this Issue · 2 comments

1 participant

@bitprophet
Owner

Description

import fabric.api as fabric

fabric.output.stdout = False

print fabric.local('ls')

Results:

[localhost] local: ls
Traceback (most recent call last):
  File "quick.py", line 5, in 
    print fabric.local('ls')
  File "/Users/crose/virtualenv/release/lib/python2.7/site-packages/fabric/operations.py", line 1001, in local
    p = subprocess.Popen([wrapped_command], shell=True, stdout=out_stream,
UnboundLocalError: local variable 'out_stream' referenced before assignment

Originally submitted by Eric Hanchrow (offby1) on 2011-03-05 at 12:36pm EST


Closed as Done on 2011-03-05 at 02:05pm EST

@bitprophet bitprophet was assigned
@bitprophet
Owner

Eric Hanchrow (offby1) posted:


It's worth noting that I see this in non-trivial code; I have a few cases where I suppress stdout/stderr in local() calls that previously captured output by default.


on 2011-03-05 at 12:44pm EST

@bitprophet
Owner

Jeff Forcier (bitprophet) posted:


Applied in changeset commit:834ace42deb0381c8d036689ff2c25c551649a38.


on 2011-03-05 at 02:05pm EST

@bitprophet bitprophet closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.