1 |
commit: df7f1d3e00a9f0de1c631422b91cac3d074ddc0f |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 28 06:30:07 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 28 06:30:07 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=df7f1d3e |
7 |
|
8 |
PipeReaderBlockingIO handle threading ImportError |
9 |
|
10 |
--- |
11 |
.../tests/process/test_PopenProcessBlockingIO.py | 1 + |
12 |
pym/portage/util/_async/PipeReaderBlockingIO.py | 6 +++++- |
13 |
2 files changed, 6 insertions(+), 1 deletions(-) |
14 |
|
15 |
diff --git a/pym/portage/tests/process/test_PopenProcessBlockingIO.py b/pym/portage/tests/process/test_PopenProcessBlockingIO.py |
16 |
index 9cdad32..9ee291a 100644 |
17 |
--- a/pym/portage/tests/process/test_PopenProcessBlockingIO.py |
18 |
+++ b/pym/portage/tests/process/test_PopenProcessBlockingIO.py |
19 |
@@ -6,6 +6,7 @@ import subprocess |
20 |
try: |
21 |
import threading |
22 |
except ImportError: |
23 |
+ # dummy_threading will not suffice |
24 |
threading = None |
25 |
|
26 |
from portage import os |
27 |
|
28 |
diff --git a/pym/portage/util/_async/PipeReaderBlockingIO.py b/pym/portage/util/_async/PipeReaderBlockingIO.py |
29 |
index 8ce2ec5..b06adf6 100644 |
30 |
--- a/pym/portage/util/_async/PipeReaderBlockingIO.py |
31 |
+++ b/pym/portage/util/_async/PipeReaderBlockingIO.py |
32 |
@@ -1,7 +1,11 @@ |
33 |
# Copyright 2012 Gentoo Foundation |
34 |
# Distributed under the terms of the GNU General Public License v2 |
35 |
|
36 |
-import threading |
37 |
+try: |
38 |
+ import threading |
39 |
+except ImportError: |
40 |
+ # dummy_threading will not suffice |
41 |
+ threading = None |
42 |
|
43 |
from portage import os |
44 |
from _emerge.AbstractPollTask import AbstractPollTask |