Merge
This commit is contained in:
@@ -58,10 +58,18 @@ class Popen(subprocess_orig.Popen):
|
||||
# don't want to rewrite the original _communicate() method, we
|
||||
# just want a version that uses eventlet.green.select.select()
|
||||
# instead of select.select().
|
||||
_communicate = new.function(subprocess_orig.Popen._communicate.im_func.func_code,
|
||||
globals())
|
||||
try:
|
||||
_communicate = new.function(subprocess_orig.Popen._communicate.im_func.func_code,
|
||||
globals())
|
||||
except AttributeError:
|
||||
# 2.4 only has communicate
|
||||
communicate = new.function(subprocess_orig.Popen.communicate.im_func.func_code,
|
||||
globals())
|
||||
|
||||
# Borrow subprocess.call() and check_call(), but patch them so they reference
|
||||
# OUR Popen class rather than subprocess.Popen.
|
||||
call = new.function(subprocess_orig.call.func_code, globals())
|
||||
check_call = new.function(subprocess_orig.check_call.func_code, globals())
|
||||
try:
|
||||
check_call = new.function(subprocess_orig.check_call.func_code, globals())
|
||||
except AttributeError:
|
||||
pass # check_call added in 2.5
|
||||
|
||||
Reference in New Issue
Block a user