From: Zac Medico <zmedico@gentoo.org> Date: Fri, 28 Dec 2012 06:30:07 +0000 (-0800) Subject: PipeReaderBlockingIO handle threading ImportError X-Git-Tag: v2.2.0_alpha150~83 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df7f1d3e00a9f0de1c631422b91cac3d074ddc0f;p=portage.git PipeReaderBlockingIO handle threading ImportError --- diff --git a/pym/portage/tests/process/test_PopenProcessBlockingIO.py b/pym/portage/tests/process/test_PopenProcessBlockingIO.py index 9cdad326d..9ee291a39 100644 --- a/pym/portage/tests/process/test_PopenProcessBlockingIO.py +++ b/pym/portage/tests/process/test_PopenProcessBlockingIO.py @@ -6,6 +6,7 @@ import subprocess try: import threading except ImportError: + # dummy_threading will not suffice threading = None from portage import os diff --git a/pym/portage/util/_async/PipeReaderBlockingIO.py b/pym/portage/util/_async/PipeReaderBlockingIO.py index 8ce2ec51b..b06adf6ed 100644 --- a/pym/portage/util/_async/PipeReaderBlockingIO.py +++ b/pym/portage/util/_async/PipeReaderBlockingIO.py @@ -1,7 +1,11 @@ # Copyright 2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -import threading +try: + import threading +except ImportError: + # dummy_threading will not suffice + threading = None from portage import os from _emerge.AbstractPollTask import AbstractPollTask