[Yum-devel] [PATCH 2/2] Use different fds for Tempfile rpm logging, so we get different off_t's
Tim Lauridsen
tim.lauridsen at googlemail.com
Wed Dec 23 08:53:29 UTC 2009
On Tue, Dec 22, 2009 at 9:17 PM, James Antill <james at and.org> wrote:
> ---
> yum/rpmtrans.py | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/yum/rpmtrans.py b/yum/rpmtrans.py
> index 73f9af1..6fde5a8 100644
> --- a/yum/rpmtrans.py
> +++ b/yum/rpmtrans.py
> @@ -206,10 +206,9 @@ class RPMTransaction:
>
> def _setupOutputLogging(self, rpmverbosity="info"):
> # UGLY... set up the transaction to record output from scriptlets
> - io_r = tempfile.TemporaryFile()
> - w = os.dup(io_r.fileno())
> + io_r = tempfile.NamedTemporaryFile()
> self._readpipe = io_r
> - self._writepipe = os.fdopen(w, 'w+b')
> + self._writepipe = open(io_r.name, 'w+b')
> self.base.ts.scriptFd = self._writepipe.fileno()
> rpmverbosity = {'critical' : 'crit',
> 'emergency' : 'emerg',
> --
> 1.6.5.2
>
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel
>
ACK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20091223/4e348c7b/attachment.htm>
More information about the Yum-devel
mailing list