diff --git a/py/c-extension/greenlet/test_generator.py b/py/c-extension/greenlet/test_generator.py index d59cbc71c..66629b88f 100644 --- a/py/c-extension/greenlet/test_generator.py +++ b/py/c-extension/greenlet/test_generator.py @@ -1,7 +1,7 @@ import py try: from py.magic import greenlet -except RuntimeError, e: +except (ImportError, RuntimeError), e: py.test.skip(str(e)) diff --git a/py/misc/buildcmodule.py b/py/misc/buildcmodule.py index c4e3590c4..a08e49e77 100644 --- a/py/misc/buildcmodule.py +++ b/py/misc/buildcmodule.py @@ -11,7 +11,6 @@ def make_module_from_c(cfile): import os, sys, imp from distutils.core import setup from distutils.extension import Extension - import stdoutcapture debug = 0 #try: @@ -36,7 +35,7 @@ def make_module_from_c(cfile): if lib.check(): lib.remove() - c = stdoutcapture.Capture(mixed_out_err = True) + c = py.io.StdCaptureFD() try: try: saved_environ = os.environ.items()