green: subprocess: patch _communicate_with_{poll,select} methods

https://github.com/eventlet/eventlet/pull/24
eventlet.green.subprocess.Popen.communicate() was broken in python 2.7
This commit is contained in:
Edward George
2013-04-05 23:24:10 +01:00
committed by Sergey Shepelev
parent 632debcea3
commit e11157a442

View File

@@ -80,6 +80,15 @@ class Popen(subprocess_orig.Popen):
try:
_communicate = new.function(subprocess_orig.Popen._communicate.im_func.func_code,
globals())
try:
_communicate_with_select = new.function(
subprocess_orig.Popen._communicate_with_select.im_func.func_code,
globals())
_communicate_with_poll = new.function(
subprocess_orig.Popen._communicate_with_poll.im_func.func_code,
globals())
except AttributeError:
pass
except AttributeError:
# 2.4 only has communicate
_communicate = new.function(subprocess_orig.Popen.communicate.im_func.func_code,