Skip to content
This repository

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

bitprophet opened this Issue August 18, 2011 · 2 comments

1 participant

Jeff Forcier
Jeff Forcier


import fabric.api as fabric

fabric.output.stdout = False

print fabric.local('ls')


[localhost] local: ls
Traceback (most recent call last):
  File "", line 5, in 
    print fabric.local('ls')
  File "/Users/crose/virtualenv/release/lib/python2.7/site-packages/fabric/", 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

Jeff Forcier

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

Jeff Forcier

Jeff Forcier (bitprophet) posted:

Applied in changeset commit:834ace42deb0381c8d036689ff2c25c551649a38.

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

Jeff Forcier bitprophet closed this August 18, 2011
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.