1 |
commit: b573f6f81c4500af9a4d08d58746d59c2b95f67c |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 1 21:05:24 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 1 21:05:24 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b573f6f8 |
7 |
|
8 |
_emerge/SubProcess.py: support int fd in _files |
9 |
|
10 |
--- |
11 |
pym/_emerge/SubProcess.py | 5 ++++- |
12 |
1 files changed, 4 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/pym/_emerge/SubProcess.py b/pym/_emerge/SubProcess.py |
15 |
index b99cf0b..37922dc 100644 |
16 |
--- a/pym/_emerge/SubProcess.py |
17 |
+++ b/pym/_emerge/SubProcess.py |
18 |
@@ -120,7 +120,10 @@ class SubProcess(AbstractPollTask): |
19 |
|
20 |
if self._files is not None: |
21 |
for f in self._files.values(): |
22 |
- f.close() |
23 |
+ if isinstance(f, int): |
24 |
+ os.close(f) |
25 |
+ else: |
26 |
+ f.close() |
27 |
self._files = None |
28 |
|
29 |
def _set_returncode(self, wait_retval): |