summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/JobStatusDisplay.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-20 22:45:32 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-20 22:45:32 +0000
commitbc3bb2a0acfc132b7e0be1beec435daecbcf9e85 (patch)
tree5e38bd0e41ec884fe7d2b0c4cd3655304fcbbf30 /pym/_emerge/JobStatusDisplay.py
parenta0093ae8eea62c089bf41ae6dc31eddb1619ad76 (diff)
downloadportage-bc3bb2a0acfc132b7e0be1beec435daecbcf9e85.tar.gz
portage-bc3bb2a0acfc132b7e0be1beec435daecbcf9e85.tar.bz2
portage-bc3bb2a0acfc132b7e0be1beec435daecbcf9e85.zip
Add fallback in ImportError for io.StringIO. This is needed for python-2.6
with USE=build since io imports threading which imports thread which is unavailable. svn path=/main/trunk/; revision=14304
Diffstat (limited to 'pym/_emerge/JobStatusDisplay.py')
-rw-r--r--pym/_emerge/JobStatusDisplay.py8
1 files changed, 7 insertions, 1 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