From df7f1d3e00a9f0de1c631422b91cac3d074ddc0f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 27 Dec 2012 22:30:07 -0800 Subject: [PATCH] PipeReaderBlockingIO handle threading ImportError --- pym/portage/tests/process/test_PopenProcessBlockingIO.py | 1 + pym/portage/util/_async/PipeReaderBlockingIO.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.26.2