1 |
Author: zmedico |
2 |
Date: 2009-02-27 05:23:37 +0000 (Fri, 27 Feb 2009) |
3 |
New Revision: 12729 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/sets/shell.py |
7 |
Log: |
8 |
Use Popen.communicate() to avoid a potential deadlock. |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/portage/sets/shell.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/portage/sets/shell.py 2009-02-27 04:17:14 UTC (rev 12728) |
14 |
+++ main/trunk/pym/portage/sets/shell.py 2009-02-27 05:23:37 UTC (rev 12729) |
15 |
@@ -33,9 +33,9 @@ |
16 |
|
17 |
def load(self): |
18 |
pipe = subprocess.Popen(self._command, stdout=subprocess.PIPE, shell=True) |
19 |
+ stdout, stderr = pipe.communicate() |
20 |
if pipe.wait() == os.EX_OK: |
21 |
- text = unicode(pipe.stdout.read(), errors='replace') |
22 |
- self._setAtoms(text.splitlines()) |
23 |
+ self._setAtoms(unicode(stdout, errors='replace').splitlines()) |
24 |
|
25 |
def singleBuilder(self, options, settings, trees): |
26 |
if not "command" in options: |