summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-02-27 05:23:37 +0000
committerZac Medico <zmedico@gentoo.org>2009-02-27 05:23:37 +0000
commitcde01d3ff9300752bfb635ad9c77436ccd251f57 (patch)
tree14bc10506b543de2ad172c11e70e6afa7e387ef2 /pym
parentf07ba1da70ae931ea827db66581e0036eeaa1fb0 (diff)
downloadportage-cde01d3ff9300752bfb635ad9c77436ccd251f57.tar.gz
portage-cde01d3ff9300752bfb635ad9c77436ccd251f57.tar.bz2
portage-cde01d3ff9300752bfb635ad9c77436ccd251f57.zip
Use Popen.communicate() to avoid a potential deadlock.
svn path=/main/trunk/; revision=12729
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/sets/shell.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/sets/shell.py b/pym/portage/sets/shell.py
index 8114b5133..43a8fe02f 100644
--- a/pym/portage/sets/shell.py
+++ b/pym/portage/sets/shell.py
@@ -33,9 +33,9 @@ class CommandOutputSet(PackageSet):
def load(self):
pipe = subprocess.Popen(self._command, stdout=subprocess.PIPE, shell=True)
+ stdout, stderr = pipe.communicate()
if pipe.wait() == os.EX_OK:
- text = unicode(pipe.stdout.read(), errors='replace')
- self._setAtoms(text.splitlines())
+ self._setAtoms(unicode(stdout, errors='replace').splitlines())
def singleBuilder(self, options, settings, trees):
if not "command" in options: