diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-02-27 05:23:37 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-02-27 05:23:37 +0000 |
commit | cde01d3ff9300752bfb635ad9c77436ccd251f57 (patch) | |
tree | 14bc10506b543de2ad172c11e70e6afa7e387ef2 | |
parent | f07ba1da70ae931ea827db66581e0036eeaa1fb0 (diff) | |
download | portage-cde01d3ff9300752bfb635ad9c77436ccd251f57.tar.gz portage-cde01d3ff9300752bfb635ad9c77436ccd251f57.tar.bz2 portage-cde01d3ff9300752bfb635ad9c77436ccd251f57.zip |
Use Popen.communicate() to avoid a potential deadlock.
svn path=/main/trunk/; revision=12729
-rw-r--r-- | pym/portage/sets/shell.py | 4 |
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: |