Skip to content

Commit

Permalink
Don't attempt to wrap GreenPipes in GreenPipe
Browse files Browse the repository at this point in the history
If the os module is monkeypatched, Python's standard subprocess module
will return greenio.GreenPipe instances for Popen objects' stdin, stdout,
and stderr attributes. However, eventlet.green.subprocess tries to wrap
these attributes in another greenio.GreenPipe, which GreenPipe refuses.
  • Loading branch information
sorenisanerd committed Feb 14, 2011
1 parent ed4f936 commit 07edafe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eventlet/green/subprocess.py
Expand Up @@ -27,7 +27,7 @@ def __init__(self, args, bufsize=0, *argss, **kwds):
# eventlet.processes.Process.run() method.
for attr in "stdin", "stdout", "stderr":
pipe = getattr(self, attr)
if pipe is not None:
if pipe is not None and not type(pipe) == greenio.GreenPipe:
wrapped_pipe = greenio.GreenPipe(pipe, pipe.mode, bufsize)
setattr(self, attr, wrapped_pipe)
__init__.__doc__ = subprocess_orig.Popen.__init__.__doc__
Expand Down

0 comments on commit 07edafe

Please sign in to comment.