summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/JobStatusDisplay.py8
-rw-r--r--pym/portage/util.py8
2 files changed, 14 insertions, 2 deletions
diff --git a/pym/_emerge/JobStatusDisplay.py b/pym/_emerge/JobStatusDisplay.py
index 7cf3607fb..f543d00bb 100644
--- a/pym/_emerge/JobStatusDisplay.py
+++ b/pym/_emerge/JobStatusDisplay.py
@@ -5,7 +5,13 @@
import formatter
import sys
import time
-from io import StringIO
+try:
+ from io import StringIO
+except ImportError:
+ # Needed for python-2.6 with USE=build since
+ # io imports threading which imports thread
+ # which is unavailable.
+ from StringIO import StringIO
import portage
from portage import os
diff --git a/pym/portage/util.py b/pym/portage/util.py
index 1401febae..a85948962 100644
--- a/pym/portage/util.py
+++ b/pym/portage/util.py
@@ -24,7 +24,13 @@ import shlex
import stat
import string
import sys
-from io import StringIO
+try:
+ from io import StringIO
+except ImportError:
+ # Needed for python-2.6 with USE=build since
+ # io imports threading which imports thread
+ # which is unavailable.
+ from StringIO import StringIO
import portage
from portage import os