From: Zac Medico Date: Thu, 1 Dec 2011 21:05:24 +0000 (-0800) Subject: _emerge/SubProcess.py: support int fd in _files X-Git-Tag: v2.2.0_alpha80~79 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b573f6f81c4500af9a4d08d58746d59c2b95f67c;p=portage.git _emerge/SubProcess.py: support int fd in _files --- diff --git a/pym/_emerge/SubProcess.py b/pym/_emerge/SubProcess.py index b99cf0bb1..37922dc66 100644 --- a/pym/_emerge/SubProcess.py +++ b/pym/_emerge/SubProcess.py @@ -120,7 +120,10 @@ class SubProcess(AbstractPollTask): if self._files is not None: for f in self._files.values(): - f.close() + if isinstance(f, int): + os.close(f) + else: + f.close() self._files = None def _set_returncode(self, wait_retval):